From 186652a8d8a213d6be2b10d8b6a20ee0f3839508 Mon Sep 17 00:00:00 2001 From: Brady Date: Sun, 18 Nov 2018 19:52:11 -0600 Subject: [PATCH] Protocol lol --- PROTOCOL.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 PROTOCOL.md diff --git a/PROTOCOL.md b/PROTOCOL.md new file mode 100644 index 00000000..8713120b --- /dev/null +++ b/PROTOCOL.md @@ -0,0 +1,36 @@ +# Baritone Comms Protocol + +## Data Types + +| Name | Descriptor | Java | +|------------|-----------------------------------------------------------|-----------------------------| +| coordinate | Big endian 8-byte floating point number | [readDouble], [writeDouble] | +| string | unsigned short (length) followed by UTF-8 character bytes | [readUTF], [writeUTF] | + +## Inbound + +Allows the server to execute a chat command on behalf of the client's player + +### Chat + +| Name | Type | +|---------|--------| +| Message | string | + +## Outbound + +Update the player position with the server + +### Status + +| Name | Type | +|------|------------| +| X | coordinate | +| Y | coordinate | +| Z | coordinate | + + +[readUTF]: https://docs.oracle.com/javase/7/docs/api/java/io/DataInputStream.html#readUTF() +[writeUTF]: https://docs.oracle.com/javase/7/docs/api/java/io/DataOutputStream.html#writeUTF(java.lang.String) +[readDouble]: https://docs.oracle.com/javase/7/docs/api/java/io/DataInputStream.html#readDouble() +[writeDouble]: https://docs.oracle.com/javase/7/docs/api/java/io/DataOutputStream.html#writeDouble(double) \ No newline at end of file