Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions docs/.vitepress/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ export const en = defineConfig({
text: "RCON",
link: "/developer/networking/rcon",
},
{
text: "Bedrock Protocol",
link: "/developer/networking/bedrock-protocol/introduction",
items: [
{
text: "Packets",
link: "/developer/networking/bedrock-protocol/packets/all",
},
],
},
],
},
{ text: "World", link: "/developer/world" },
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"details": {
"type": "object",
"properties": {
"short_description": {
"type": "string"
},
"long_description": {
"type": "string"
},
"direction": {
"type": "string",
"enum": ["server-bound", "client-bound"]
},
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/field"
}
},
"types": {
"type": "array",
"items": {
"$ref": "#/$defs/local-type"
}
}
},
"required": [
"short_description",
"long_description",
"direction",
"fields"
],
"additionalProperties": false
}
},
"required": ["name", "id"],
"additionalProperties": false,
"$defs": {
"field-type": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": ["primitive", "local", "global"]
},
"name": {
"type": "string"
}
},
"required": ["kind", "name"],
"additionalProperties": false
},
"field": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"$ref": "#/$defs/field-type"
},
"description": {
"type": "string"
}
},
"required": ["name", "type", "description"],
"additionalProperties": false
},

"local-type-enum": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"kind": {
"type": "string",
"const": "enum"
},
"repr": {
"type": "string",
"enum": ["u8", "u16", "u32", "u64"]
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "integer"
},
"description": {
"type": "string"
}
},
"required": ["name", "value", "description"],
"additionalProperties": false
}
}
},
"required": ["name", "kind", "description", "repr"],
"additionalProperties": false
},

"local-type-record": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"kind": {
"type": "string",
"const": "enum"
},
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/field"
}
}
},
"required": ["name", "kind", "description", "fields"],
"additionalProperties": false
},
"local-type": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"kind": {
"type": "string",
"enum": ["enum", "record"]
}
},
"oneOf": [
{ "$ref": "#/$defs/local-type-enum" },
{ "$ref": "#/$defs/local-type-record" }
]
}
}
}
19 changes: 19 additions & 0 deletions docs/en/developer/networking/bedrock-protocol/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Minecraft Bedrock Protocol

## Introduction

Pumpkin supports both Java Edition and Bedrock Edition clients.

This section is a WIP attempt at documenting the Bedrock protocol, independently of Pumpkin's particular implementation in Rust.

There are a handful of sources on it, including Mojang's own official [bedrock-protocol-docs](https://github.com/Mojang/bedrock-protocol-docs). However at the time of this writing, the official docs are not always intuitive to read, e.g. being inconsistent on how they present information. Meanwhile other documentation such as that found on [minecraft.wiki](https://minecraft.wiki/w/Bedrock_Edition_protocol) is incomplete.

This guide aggregates information from the official docs, and information gleaned from various implementations such as [gophertunnel](https://github.com/Sandertv/gophertunnel), [BetterAltay](https://github.com/Benedikt05/BetterAltay), [GeyserMC](https://github.com/GeyserMC/Geyser), [Cloudburst Nukkit](https://github.com/CloudburstMC/Nukkit), etc. and tries to lay it out in an easy to understand way.

## Underylying Protocols

The Bedrock Protocol is layered over one of two other protocols: RakNet or NetherNet

RakNet is the older of the two, built atop of UDP, and is the one currently implemented by Pumpkin. Most other Bedrock server implementations also stick to RakNet.

NetherNet is a newer protocol designed specifically for Minecraft backed by WebRTC. Xbox Live sessions and LAN games hosted by the official client have transitioned to using it. There is not a great deal of publically available information about it. [NetherNet of the Bedrock Wiki](https://wiki.bedrock.dev/servers/nethernet)

Check warning on line 19 in docs/en/developer/networking/bedrock-protocol/introduction.md

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"publically" should be "publicly".
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- @content -->
Loading
Loading