9223b401e7
Horizon decoded 25 of 26.3's 122 data component types. Item data has no length prefix, so a stack with any other component (an armour trim, banner patterns, pot sherds, a stew's effects, a plugin's item) made the whole packet undecodable and it was dropped: on a Paper server the inventory arrived empty until each slot was clicked, the advancements screen said "There doesn't seem to be anything here..." and the recipe book was empty. Every other component is now read to its end with its vanilla StreamCodec (item/skip.rs) and kept as its bytes, written back as they came; components without a network codec go as their NBT. The client leaves them out of the item's components, so the item keeps its prototype's values for them. tools/test_item_wire_parity.py checks it against vanilla: the oracle encodes 374 stacks with ItemStack.OPTIONAL_STREAM_CODEC (every default component value of every item, SNBT fixtures for the rest, direct holders and removals built in Java), covering all 122 component types, and the Rust probe must consume every byte, find the same component ids and encode the read-past ones back to the same bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
885 B
TOML
31 lines
885 B
TOML
[package]
|
|
name = "horizon-protocol"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
description = "Horizon's Minecraft Java Edition 26.3 network protocol (version 777)"
|
|
|
|
[dependencies]
|
|
horizon-core = { path = "../horizon-core" }
|
|
horizon-world = { path = "../horizon-world" }
|
|
flate2 = { version = "1.1.10", default-features = false, features = ["zlib-rs", "runtime_detection"] }
|
|
serde_json = "1.0.151"
|
|
# The shared secret and RSA padding (OS randomness) and the server hash.
|
|
getrandom = "0.3"
|
|
sha1 = "0.10"
|
|
# Secure chat: SHA256withRSA message signatures.
|
|
sha2 = "0.10"
|
|
|
|
# Its own name, not `probe`: Cargo copies every crate's examples into one target/<profile>/examples.
|
|
[[example]]
|
|
name = "protocol_probe"
|
|
path = "examples/probe.rs"
|
|
|
|
[[example]]
|
|
name = "item_wire_probe"
|
|
path = "examples/item_wire_probe.rs"
|
|
|
|
[lints]
|
|
workspace = true
|