File tree Expand file tree Collapse file tree 3 files changed +23
-11
lines changed
api/src/main/java/com/turikhay/mc/mapmodcompanion
spigot/src/main/java/com/turikhay/mc/mapmodcompanion/spigot Expand file tree Collapse file tree 3 files changed +23
-11
lines changed Original file line number Diff line number Diff line change 1010import static com .turikhay .mc .mapmodcompanion .Id .MAGIC_MARKER ;
1111
1212/**
13- * Parsed description of a VoxelMap-style world id request packet.
13+ * Description of a packet sent by VoxelMap-style clients to request the
14+ * server's {@code world_id}.
1415 *
15- * <p>Clients send such a packet to learn how the server expects the id to be
16+ * <p>Clients send this packet to learn how the server expects the id to be
1617 * encoded. Use {@link #parse(byte[], Integer)} to interpret the request and
1718 * {@link #constructId(int)} to produce a {@link PrefixedId} for the response.</p>
1819 *
@@ -74,7 +75,8 @@ public String toString() {
7475 * Parses a VoxelMap-style request packet.
7576 *
7677 * @param payload raw packet bytes
77- * @param protocolVersion client's protocol version or {@code null} if unknown
78+ * @param protocolVersion client's protocol version or {@code null} if unknown;
79+ * see {@link ProtocolVersion} for common constants
7880 * @return parsed request descriptor
7981 * @throws MalformedPacketException if the payload cannot be parsed
8082 */
Original file line number Diff line number Diff line change 1+ package com .turikhay .mc .mapmodcompanion ;
2+
3+ /**
4+ * Well-known Minecraft protocol version numbers.
5+ *
6+ * <p>These constants can be used to interpret version-specific nuances in
7+ * packet formats.</p>
8+ */
9+ public interface ProtocolVersion {
10+ /** Protocol version number for Minecraft 1.13.2. */
11+ int MINECRAFT_1_13_2 = 404 ;
12+ /** Protocol version number for Minecraft 1.14.4. */
13+ int MINECRAFT_1_14_4 = 498 ;
14+ /** Protocol version number for Minecraft 1.15.2. */
15+ int MINECRAFT_1_15_2 = 578 ;
16+ /** Protocol version number for Minecraft 1.16.3. */
17+ int MINECRAFT_1_16_3 = 753 ;
18+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments