Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add motd docs #1

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Shadowsniper784
Copy link

add docs for unconnected ping and pong as the motd

@theaddonn
Copy link
Member

THAT WAS FAST!🔥

@Shadowsniper784
Copy link
Author

Oopsie forgot OfflineMessageID on response

Copy link
Member

@theaddonn theaddonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems very good! But there are still a few things that might need an improvement..

oh, also move this into the docs/raknet/ directory, thanks :)

docs/MOTD.md Outdated Show resolved Hide resolved
docs/MOTD.md Outdated Show resolved Hide resolved
docs/MOTD.md Outdated Show resolved Hide resolved
docs/MOTD.md Outdated Show resolved Hide resolved
docs/MOTD.md Outdated Show resolved Hide resolved
docs/MOTD.md Outdated Show resolved Hide resolved
Shadowsniper784 and others added 2 commits October 28, 2024 21:55
Co-authored-by: MisledWater79 <[email protected]>
Moved to /raknet
Changed to Message Of The Day
Added Education Edition
Did not fix the datatyoes
@theaddonn
Copy link
Member

How are the changes going?

@theaddonn
Copy link
Member

@MisledWater79 Do you think we could merge this?

@MisledWater79
Copy link
Contributor

@theaddonn I would say merge it, it has some parts that will probably remove/move but its mostly good.

@MisledWater79
Copy link
Contributor

Actually scratch that, thats a LOT of code... maybe move that to a link to github or different page.

Comment on lines +357 to +364
## Sources
- [Go Raknet](https://github.com/Sandertv/go-raknet/blob/master/internal/message/unconnected_ping.go#L8)<br>
- [PHP MC Query](https://github.com/xPaw/PHP-Minecraft-Query/blob/master/src/MinecraftQuery.php#L212)<br>
- [Raknet](https://github.com/facebookarchive/RakNet/blob/1a169895a900c9fc4841c556e16514182b75faf8/Source/RakPeer.cpp#L135)<br>
- [Phantom](https://github.com/jhead/phantom/blob/44056d83afbfe60b253faff01308d171ac21e8d6/internal/proto/proto.go#L23)<br>
- [Geyser](https://github.com/GeyserMC/Protocol/blob/46b4ad37b159b1fc59e45871f7572101f5ed43ab/bedrock-connection/src/main/java/org/cloudburstmc/protocol/bedrock/BedrockPong.java#L23)<br>
- [Wiki.vg](https://wiki.vg/Raknet_Protocol#Unconnected_Ping)<br>
- Wireshark
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use #### Resources instead, along with that set the links to be this format: [[wiki.vg/Minecraft Wiki](https://minecraft.wiki/w/Minecraft_Wiki:Projects/wiki.vg_merge/Raknet_Protocol)]: Some description here of what was used (I think the wiki.vg link is the only one that needs updated since it was moved to the actual wiki)

Ends with `0` to signify the conclusion of the MOTD string.

## Code Examples
::: details Code Examples
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the dropdown as ill be implementing it directly to the code groups.

Comment on lines +26 to +37
#### Validation Criteria

1. **Packet Size:**
The total size must be exactly 33 bytes.
2. **Packet ID:**
Must strictly be `0x01`.
3. **Timestamp:**
It is just a timestamp of uptime, but we can check it is not infront of unix timestamp
4. **Magic Offline Message ID:**
Must match the predefined 16-byte sequence.
5. **GUID:**
It doesn't really need to be checked, but it is there
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a point to this area, personally I think it's not really useful. let me know if I'm wrong though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The explanaition of the packets shouldn't be in this file, as this is labeled Message of the Day (MOTD) Protocol Documentation so it should be more just on the motd and not explaining the entirety of where it comes from.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I split it into separate files like: unconnectedpong.md or something like that? Maybe in like a MOTD subgroup as they aren't used elsewhere

::: details Code Examples
::: code-group

```rust [src/main.rs]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say change the names to just be a Rust and Typescript instead of a file path.

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.

3 participants