Files
Pumpkin/pumpkin-protocol/Cargo.toml
Megalith f676bdd222 fix(protocol): remap particle IDs for older clients (#2451)
* feat(protocol): generate particle ID remap tables

Generate version-specific particle registry mappings from the existing ViaBackwards data for every supported Java protocol version.\n\nExpose the generated remapper through pumpkin-data and enable it for pumpkin-protocol so packet serializers can translate current registry IDs for older clients.

* fix(protocol): remap explosion particles for older clients

Translate the explosion particle registry ID for each client's negotiated Java version before serializing the explode packet.\n\nWithout this remap, 1.21.11 interpreted the 26.2 explosion-emitter ID as falling dust, consumed the following bytes as particle data, and disconnected with a decoder exception. Add packet-level coverage for both 1.21.11 and 26.2 encodings.

* fix(protocol): remap particle IDs for older clients

Level-particle packets and particle entity metadata still encoded raw 26.2 registry IDs, causing older clients to decode the wrong particle schema and disconnect. Route every active outbound particle path through the version remapper, preserve metadata payloads, and cover 1.21.11 and 26.2 encodings with regression tests.
2026-07-24 18:14:18 +02:00

45 lines
1.0 KiB
TOML

[package]
name = "pumpkin-protocol"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
[features]
default = ["query"]
serverbound = []
clientbound = []
query = []
[dependencies]
pumpkin-nbt.workspace = true
pumpkin-data = { workspace = true, features = ["packet", "item_id_remap", "entity_id_remap", "sound_id_remap", "particle_id_remap", "recipes", "bedrock_creative"] }
pumpkin-macros.workspace = true
pumpkin-world.workspace = true
pumpkin-util.workspace = true
serde = { workspace = true, features = ["derive"] }
uuid.workspace = true
thiserror.workspace = true
tokio = { workspace = true, features = ["net"] }
bytes.workspace = true
# encryption
aes.workspace = true
cfb8.workspace = true
ctr.workspace = true
sha2.workspace = true
hybrid-array = "0.4"
# compression
async-compression = { workspace = true, features = ["tokio", "zlib", "deflate"] }
flate2.workspace = true
bitflags.workspace = true
[dev-dependencies]
# Validate correctness
[lints]
workspace = true