mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
improve doc
This commit is contained in:
@@ -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,
|
||||
}
|
||||
``
|
||||
@@ -19,6 +19,7 @@ pub struct Registry {
|
||||
}
|
||||
|
||||
impl Registry {
|
||||
/// We should parse this from a JSON in the future
|
||||
pub fn get_static() -> Vec<Self> {
|
||||
let dimensions = Registry {
|
||||
registry_id: "minecraft:dimension_type".to_string(),
|
||||
|
||||
46
pumpkin-text/README.md
Normal file
46
pumpkin-text/README.md
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user