Skip to content

EndstoneMC/protocol-dumper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

protocol-dumper

Dumps Bedrock Dedicated Server packet schemas as JSON.

libprotocol_dumper.so is LD_PRELOADed into BDS, walks the cereal/EnTT reflection graph the server builds at startup, and writes one JSON file per packet, struct, and enum.

Build

clang++ + libc++ + lld:

cmake --preset clang-release
cmake --build --preset clang-release

Use clang-relwithdebinfo for a build with debug info. Outputs build/release/libprotocol_dumper.so.

Run

LD_PRELOAD=./build/release/libprotocol_dumper.so ./bedrock_server

Schemas land in data/protocol/ next to the host executable.

Schema

Kaitai-flavoured JSON. Each field has a wire type plus optional modifiers (enum, repeat, optional, deprecated, constraints, description). Maps are {key, value} objects; variants are {switch, cases}.

{
  "id": 27,
  "name": "ActorEventPacket",
  "fields": [
    { "name": "mRuntimeId", "type": "varint64" },
    { "name": "mEventId",   "type": "uvarint32", "enum": "ActorEvent" }
  ]
}

Dependencies

EnTT (must match the version BDS was built against — ABI), nlohmann/json, libhat, expected-lite. All fetched via CMake FetchContent.

About

Extract packet schemas from BDS via cereal reflection

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors