Skip to content

Commit 1ce1f98

Browse files
committed
update to MC 1.21.2
1 parent 9865364 commit 1ce1f98

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Minecraft bot stress tester
22
🤖 A simple open source app written in Java used for stress testing Minecraft servers with bots (fake players).
33
💥 It can be also used to test plugins or minigames.
4-
✔️ The MC version of the bots is 1.21
4+
✔️ The MC version of the bots is 1.21.2, supports 1.21.3
55
For older MC versions please look in the [releases](https://github.com/crpmax/mc-bots/releases " releases").
66

77
## 🆒 Features

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins {
33
}
44

55
group 'me.creepermaxcz.mc-bots'
6-
version '1.2.12'
6+
version '1.2.13'
77

88
sourceCompatibility = 1.17
99
targetCompatibility = 1.17
@@ -16,7 +16,7 @@ repositories {
1616
}
1717

1818
dependencies {
19-
implementation 'org.geysermc.mcprotocollib:protocol:1.21-SNAPSHOT'
19+
implementation 'org.geysermc.mcprotocollib:protocol:1.21.2-SNAPSHOT'
2020
implementation 'net.kyori:adventure-text-serializer-gson:4.16.0'
2121
implementation 'commons-cli:commons-cli:1.5.0'
2222
implementation 'com.diogonunes:JColor:5.2.0'

src/main/java/me/creepermaxcz/mcbots/Bot.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ public void packetReceived(Session session, Packet packet) {
9292
else if (packet instanceof ClientboundPlayerPositionPacket) {
9393
ClientboundPlayerPositionPacket p = (ClientboundPlayerPositionPacket) packet;
9494

95-
lastX = p.getX();
96-
lastY = p.getY();
97-
lastZ = p.getZ();
95+
lastX = p.getPosition().getX();
96+
lastY = p.getPosition().getY();
97+
lastZ = p.getPosition().getZ();
9898

99-
client.send(new ServerboundAcceptTeleportationPacket(p.getTeleportId()));
99+
client.send(new ServerboundAcceptTeleportationPacket(p.getId()));
100100
}
101101
else if (packet instanceof ClientboundPlayerCombatKillPacket){
102102
if (Main.autoRespawnDelay >= 0) {
@@ -207,7 +207,7 @@ public void move(double x, double y, double z)
207207

208208
public void moveTo(double x, double y, double z)
209209
{
210-
client.send(new ServerboundMovePlayerPosPacket(true, x, y, z));
210+
client.send(new ServerboundMovePlayerPosPacket(true, false, x, y, z));
211211
}
212212

213213
public boolean isConnected() {

0 commit comments

Comments
 (0)