chore: bump to 1.21.4
This commit is contained in:
parent
ac781cd224
commit
22a5b67c91
2 changed files with 11 additions and 9 deletions
|
@ -37,7 +37,7 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.geysermc.mcprotocollib:protocol:1.21.2-SNAPSHOT'
|
||||
implementation 'org.geysermc.mcprotocollib:protocol:1.21.4-SNAPSHOT'
|
||||
implementation 'org.luaj:luaj-jse:3.0.1'
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package me.chayapak1.testingbot.base;
|
||||
|
||||
import org.geysermc.mcprotocollib.network.ClientSession;
|
||||
import org.geysermc.mcprotocollib.network.Session;
|
||||
import org.geysermc.mcprotocollib.network.event.session.DisconnectedEvent;
|
||||
import org.geysermc.mcprotocollib.network.event.session.SessionAdapter;
|
||||
import org.geysermc.mcprotocollib.network.factory.ClientNetworkSessionFactory;
|
||||
import org.geysermc.mcprotocollib.network.packet.Packet;
|
||||
import org.geysermc.mcprotocollib.network.tcp.TcpClientSession;
|
||||
import org.geysermc.mcprotocollib.protocol.MinecraftProtocol;
|
||||
import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
|
||||
|
||||
|
@ -12,7 +13,7 @@ import java.util.Timer;
|
|||
import java.util.TimerTask;
|
||||
|
||||
public class BaseBot extends SessionAdapter {
|
||||
public Session session;
|
||||
public ClientSession session;
|
||||
|
||||
public boolean loggedIn = false;
|
||||
|
||||
|
@ -30,12 +31,13 @@ public class BaseBot extends SessionAdapter {
|
|||
|
||||
final MinecraftProtocol protocol = new MinecraftProtocol(username);
|
||||
|
||||
session = new TcpClientSession(
|
||||
System.getProperty("host", "localhost"),
|
||||
Integer.parseInt(System.getProperty("port", "25565")),
|
||||
|
||||
protocol
|
||||
);
|
||||
session = ClientNetworkSessionFactory.factory()
|
||||
.setAddress(
|
||||
System.getProperty("host", "localhost"),
|
||||
Integer.parseInt(System.getProperty("port", "25565"))
|
||||
)
|
||||
.setProtocol(protocol)
|
||||
.create();
|
||||
|
||||
this.chat = new Chat(this);
|
||||
this.core = new Core(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue