diff --git a/pumpkin-protocol/README.md b/pumpkin-protocol/README.md index bb90c665a..4ea5c5c71 100644 --- a/pumpkin-protocol/README.md +++ b/pumpkin-protocol/README.md @@ -22,7 +22,7 @@ Packets in the Pumpkin protocol are organized by functionality and state. You can find all Minecraft Java packets at https://wiki.vg/Protocol. There you also can see in which [State](State) they are. You also can see all the information the Packets has which we can either Write or Read depending if its Serverbound or Clientbound #### Adding a Packet -Adding a Packet is easy. First you have to dereive serde Serialize. +Adding a Packet is easy. First you have to dereive serde Serialize for Clientbound Packets or Deserialize for Serverbound packets. ```rust #[derive(Serialize)] ``` @@ -47,7 +47,8 @@ impl CPlayDisconnect { } } ``` -At the End everything should come together +At the End everything should come together, +Thats a Clientbound Packet ```rust #[derive(Serialize)] #[packet(0x1D)] @@ -60,4 +61,12 @@ impl CPlayDisconnect { Self { reason } } } +``` +Thats a Serverbound packet +```rust +#[derive(Deserialize)] +#[packet(0x1D)] +pub struct CPlayDisconnect { + reason: TextComponent, +} `` \ No newline at end of file diff --git a/pumpkin-registry/src/lib.rs b/pumpkin-registry/src/lib.rs index 4f850586b..545a54806 100644 --- a/pumpkin-registry/src/lib.rs +++ b/pumpkin-registry/src/lib.rs @@ -19,6 +19,7 @@ pub struct Registry { } impl Registry { + /// We should parse this from a JSON in the future pub fn get_static() -> Vec { let dimensions = Registry { registry_id: "minecraft:dimension_type".to_string(), diff --git a/pumpkin-text/README.md b/pumpkin-text/README.md new file mode 100644 index 000000000..24a56dfbc --- /dev/null +++ b/pumpkin-text/README.md @@ -0,0 +1,46 @@ +### Pumpkin Text +Here we build Mojang's Textcomponent, Which is used across many places, Often where text is send to the player. + +### Features +- Colors + - [ ] RBG + - [x] Black + - [x] Dark Blue + - [x] Dark Green + - [x] Dark Aqua + - [x] Dark Red + - [x] Dark Purple + - [x] Gold + - [x] Gray + - [x] Dark Gray + - [x] Blue + - [x] Green + - [x] Aqua + - [x] Red + - [x] Light Purple + - [x] Yellow + - [x] White +- Style + - [x] Bold + - [x] Italic + - [x] Underlined + - [x] Strikethrough + - [x] Obfuscated + - [x] Insertion +- Click Event + - [x] Open URL + - [x] Run Command + - [x] Suggest Command + - [x] Change Pange (Book) + - [x] Copy to Clipboard +- Hover Event + - [x] Show Text + - [x] Show Item + - [x] ShowEntity +- Fonts + - [x] Default + - [ ] Uniform (Unicode) + - [ ] Alt + - [ ] Illageralt + +Reference: https://wiki.vg/Text_formatting \ No newline at end of file