Automate the stress testing of a Minecraft server network using bots

Update to 1.20.1

PureGero cd3de08a 4dee4e00

Changed files
+10 -10
src
main
java
com
github
puregero
minecraftstresstest
+1 -1
src/main/java/com/github/puregero/minecraftstresstest/Bot.java
··· 12 12 import java.util.function.Consumer; 13 13 14 14 public class Bot extends ChannelInboundHandlerAdapter { 15 - private static final int PROTOCOL_VERSION = Integer.parseInt(System.getProperty("bot.protocol.version", "761")); // 761 is 1.19.3 https://wiki.vg/Protocol_version_numbers 15 + private static final int PROTOCOL_VERSION = Integer.parseInt(System.getProperty("bot.protocol.version", "763")); // 761 is 1.20.1 https://wiki.vg/Protocol_version_numbers 16 16 private static final double CENTER_X = Double.parseDouble(System.getProperty("bot.x", "0")); 17 17 private static final double CENTER_Z = Double.parseDouble(System.getProperty("bot.z", "0")); 18 18 private static final boolean LOGS = Boolean.parseBoolean(System.getProperty("bot.logs", "true"));
+9 -9
src/main/java/com/github/puregero/minecraftstresstest/PacketIds.java
··· 17 17 public static final class Play { 18 18 private Play() {} 19 19 public static final int 20 - DISCONNECT = 0x17, 21 - KEEP_ALIVE = 0x1F, 22 - PING = 0x2E, 23 - SYNCHRONIZE_PLAYER_POSITION = 0x38, 24 - RESOURCE_PACK = 0x3C; 20 + DISCONNECT = 0x1A, 21 + KEEP_ALIVE = 0x23, 22 + PING = 0x32, 23 + SYNCHRONIZE_PLAYER_POSITION = 0x3C, 24 + RESOURCE_PACK = 0x40; 25 25 } 26 26 27 27 } ··· 45 45 private Play() {} 46 46 public static final int 47 47 CONFIRM_TELEPORTATION = 0x00, 48 - CLIENT_INFORMATION = 0x07, 49 - KEEP_ALIVE = 0x11, 50 - SET_PLAYER_POSITION_AND_ROTATION = 0x14, 51 - PONG = 0x1F, 48 + CLIENT_INFORMATION = 0x08, 49 + KEEP_ALIVE = 0x12, 50 + SET_PLAYER_POSITION_AND_ROTATION = 0x15, 51 + PONG = 0x20, 52 52 RESOURCE_PACK = 0x24; 53 53 } 54 54