mirror of
https://github.com/SerendipityR-2022/EndMinecraftPlusV2.git
synced 2024-10-31 20:08:00 +00:00
修复协议版本758后TeleportationPacket数据包回应
This commit is contained in:
parent
6e2982a7d5
commit
904fc93515
@ -1,13 +1,12 @@
|
||||
package cn.serendipityr.EndMinecraftPlusV2.VersionControl;
|
||||
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.AttackUtils.*;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.EndMinecraftPlusV2;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.ForgeProtocol.MCForge;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.ForgeProtocol.MCForgeMOTD;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.ConfigUtil;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.DataUtil;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.LogUtil;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.Tools.OtherUtils;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.AttackUtils.*;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.ForgeProtocol.MCForge;
|
||||
import cn.serendipityr.EndMinecraftPlusV2.VersionControl.OldVersion.ForgeProtocol.MCForgeMOTD;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
|
@ -16,6 +16,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.server.ServerJoinGamePack
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerPluginMessagePacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.server.entity.player.ServerPlayerPositionRotationPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundCustomPayloadPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerStatusOnlyPacket;
|
||||
import com.github.steveice10.packetlib.ProxyInfo;
|
||||
import com.github.steveice10.packetlib.Session;
|
||||
import com.github.steveice10.packetlib.event.session.*;
|
||||
@ -87,9 +88,9 @@ public class NewBotAttack extends IAttack {
|
||||
} else {
|
||||
c.send(new ClientChatPacket(getRandMessage(clientName.get(c))));
|
||||
}
|
||||
}
|
||||
|
||||
OtherUtils.doSleep(ConfigUtil.ChatDelay);
|
||||
}
|
||||
} else if (c.hasFlag("join")) {
|
||||
if (ConfigUtil.RegisterAndLogin) {
|
||||
for (String cmd:ConfigUtil.RegisterCommands) {
|
||||
@ -469,11 +470,10 @@ public class NewBotAttack extends IAttack {
|
||||
VersionSupport758.sendClientPlayerChangeHeldItemPacket(session, 1);
|
||||
} else if (recvPacket instanceof ClientboundPlayerPositionPacket) {
|
||||
try {
|
||||
// BUG: 稳定触发Unregistered packet错误
|
||||
//ClientboundPlayerPositionPacket packet = (ClientboundPlayerPositionPacket) recvPacket;
|
||||
//VersionSupport758.sendPosPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
||||
//session.send(new ServerboundMovePlayerStatusOnlyPacket(true));
|
||||
//VersionSupport758.sendClientTeleportConfirmPacket(session, packet);
|
||||
ClientboundPlayerPositionPacket packet = (ClientboundPlayerPositionPacket) recvPacket;
|
||||
VersionSupport758.sendPosPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
||||
session.send(new ServerboundMovePlayerStatusOnlyPacket(true));
|
||||
VersionSupport758.sendClientTeleportConfirmPacket(session, packet);
|
||||
} catch (Exception ignored) {}
|
||||
} else if (ProtocolLibs.adaptAfter760 && VersionSupport760.checkServerChatPacket(recvPacket)) {
|
||||
List<String> result = VersionSupport760.clickVerifiesHandle(recvPacket, session, ConfigUtil.ClickVerifiesDetect, null);
|
||||
|
Loading…
Reference in New Issue
Block a user