Skip to content

Support double and list dynamic values in ClientboundDataStorePacket - #349

Merged
PetteriM1 merged 2 commits into
CloudburstMC:3.0from
darkcupid412:fix/datastore-dynamic-value-tags
Aug 7, 2026
Merged

Support double and list dynamic values in ClientboundDataStorePacket#349
PetteriM1 merged 2 commits into
CloudburstMC:3.0from
darkcupid412:fix/datastore-dynamic-value-tags

Conversation

@darkcupid412

Copy link
Copy Markdown
Contributor

The DataStoreChange dynamic value is a cereal::DynamicValue variant tagged by alternative index: 0 null, 1 bool, 2 int64, 3 double, 4 string, 5 list, 6 map. Tags 3 and 5 were unhandled and threw IllegalStateException, dropping the packet. Vanilla writes every non-integer number as a double and rawtext as a list, so all 1.26.40 data-driven form seeds failed to decode.

Verified both directions against BDS 1.26.40.8; the tag order matches BDS symbols and the gophertunnel/pmmp implementations.

The DataStoreChange dynamic value is a cereal::DynamicValue variant
tagged by alternative index: 0 null, 1 bool, 2 int64, 3 double,
4 string, 5 list, 6 map. Tags 3 and 5 were unhandled and threw
IllegalStateException, dropping the packet - vanilla writes every
non-integer number as a double and rawtext as a list, so all 1.26.40
data-driven form seeds failed to decode.
A forged varuint length reached new ArrayList<>(length) directly, allowing
a large allocation before the loop hits buffer underflow. Cap the pre-size
by readableBytes / 4 (each entry carries at least a 4-byte type tag); the
loop still terminates on underflow for truncated payloads.
@PetteriM1
PetteriM1 merged commit 7b86cc0 into CloudburstMC:3.0 Aug 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants