mirror of
https://github.com/SerendipityR-2022/EndMinecraftPlusV2.git
synced 2024-09-19 15:23:26 +00:00
Fix: 修复高版本未正确处理移动数据包
This commit is contained in:
parent
4522866ff8
commit
f7df9cb249
@ -20,6 +20,7 @@ import org.spacehq.mc.protocol.packet.ingame.client.*;
|
|||||||
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
||||||
|
import org.spacehq.mc.protocol.packet.ingame.client.world.ClientTeleportConfirmPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerChatPacket;
|
import org.spacehq.mc.protocol.packet.ingame.server.ServerChatPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
import org.spacehq.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
import org.spacehq.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
||||||
@ -112,6 +113,8 @@ public class PacketHandler implements cn.serendipityr.EndMinecraftPlusV2.Multipl
|
|||||||
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
||||||
Session session = ((Client) client).getSession();
|
Session session = ((Client) client).getSession();
|
||||||
ServerPlayerPositionRotationPacket packet = (ServerPlayerPositionRotationPacket) recvPacket;
|
ServerPlayerPositionRotationPacket packet = (ServerPlayerPositionRotationPacket) recvPacket;
|
||||||
|
ClientTeleportConfirmPacket teleportConfirmPacket = new ClientTeleportConfirmPacket(packet.getTeleportId());
|
||||||
|
session.send(teleportConfirmPacket);
|
||||||
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
||||||
sendClientPlayerMovementPacket(session, true);
|
sendClientPlayerMovementPacket(session, true);
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ import org.spacehq.mc.protocol.packet.ingame.client.*;
|
|||||||
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
||||||
|
import org.spacehq.mc.protocol.packet.ingame.client.world.ClientTeleportConfirmPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerChatPacket;
|
import org.spacehq.mc.protocol.packet.ingame.server.ServerChatPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
import org.spacehq.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
import org.spacehq.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
||||||
@ -102,6 +103,8 @@ public class PacketHandler implements cn.serendipityr.EndMinecraftPlusV2.Multipl
|
|||||||
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
||||||
Session session = ((Client) client).getSession();
|
Session session = ((Client) client).getSession();
|
||||||
ServerPlayerPositionRotationPacket packet = (ServerPlayerPositionRotationPacket) recvPacket;
|
ServerPlayerPositionRotationPacket packet = (ServerPlayerPositionRotationPacket) recvPacket;
|
||||||
|
ClientTeleportConfirmPacket teleportConfirmPacket = new ClientTeleportConfirmPacket(packet.getTeleportId());
|
||||||
|
session.send(teleportConfirmPacket);
|
||||||
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
||||||
sendClientPlayerMovementPacket(session, true);
|
sendClientPlayerMovementPacket(session, true);
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.client.*;
|
|||||||
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
||||||
|
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientTeleportConfirmPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerChatPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerChatPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
||||||
@ -95,6 +96,8 @@ public class PacketHandler implements cn.serendipityr.EndMinecraftPlusV2.Multipl
|
|||||||
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
||||||
Session session = ((Client) client).getSession();
|
Session session = ((Client) client).getSession();
|
||||||
ServerPlayerPositionRotationPacket packet = (ServerPlayerPositionRotationPacket) recvPacket;
|
ServerPlayerPositionRotationPacket packet = (ServerPlayerPositionRotationPacket) recvPacket;
|
||||||
|
ClientTeleportConfirmPacket teleportConfirmPacket = new ClientTeleportConfirmPacket(packet.getTeleportId());
|
||||||
|
session.send(teleportConfirmPacket);
|
||||||
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
||||||
sendClientPlayerMovementPacket(session, true);
|
sendClientPlayerMovementPacket(session, true);
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.client.*;
|
|||||||
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
||||||
|
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientTeleportConfirmPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerChatPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerChatPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
||||||
@ -96,6 +97,8 @@ public class PacketHandler implements cn.serendipityr.EndMinecraftPlusV2.Multipl
|
|||||||
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
||||||
Session session = ((Client) client).getSession();
|
Session session = ((Client) client).getSession();
|
||||||
ServerPlayerPositionRotationPacket packet = (ServerPlayerPositionRotationPacket) recvPacket;
|
ServerPlayerPositionRotationPacket packet = (ServerPlayerPositionRotationPacket) recvPacket;
|
||||||
|
ClientTeleportConfirmPacket teleportConfirmPacket = new ClientTeleportConfirmPacket(packet.getTeleportId());
|
||||||
|
session.send(teleportConfirmPacket);
|
||||||
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
||||||
sendClientPlayerMovementPacket(session, true);
|
sendClientPlayerMovementPacket(session, true);
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.client.*;
|
|||||||
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
||||||
|
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientTeleportConfirmPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerChatPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerChatPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
||||||
@ -96,6 +97,8 @@ public class PacketHandler implements cn.serendipityr.EndMinecraftPlusV2.Multipl
|
|||||||
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
||||||
Session session = ((Client) client).getSession();
|
Session session = ((Client) client).getSession();
|
||||||
ServerPlayerPositionRotationPacket packet = (ServerPlayerPositionRotationPacket) recvPacket;
|
ServerPlayerPositionRotationPacket packet = (ServerPlayerPositionRotationPacket) recvPacket;
|
||||||
|
ClientTeleportConfirmPacket teleportConfirmPacket = new ClientTeleportConfirmPacket(packet.getTeleportId());
|
||||||
|
session.send(teleportConfirmPacket);
|
||||||
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
||||||
sendClientPlayerMovementPacket(session, true);
|
sendClientPlayerMovementPacket(session, true);
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.client.*;
|
|||||||
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
||||||
|
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientTeleportConfirmPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerChatPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerChatPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
||||||
@ -97,6 +98,8 @@ public class PacketHandler implements cn.serendipityr.EndMinecraftPlusV2.Multipl
|
|||||||
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
||||||
TcpClientSession session = (TcpClientSession) client;
|
TcpClientSession session = (TcpClientSession) client;
|
||||||
ServerPlayerPositionRotationPacket packet = (ServerPlayerPositionRotationPacket) recvPacket;
|
ServerPlayerPositionRotationPacket packet = (ServerPlayerPositionRotationPacket) recvPacket;
|
||||||
|
ClientTeleportConfirmPacket teleportConfirmPacket = new ClientTeleportConfirmPacket(packet.getTeleportId());
|
||||||
|
((TcpClientSession) client).send(teleportConfirmPacket);
|
||||||
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
||||||
sendClientPlayerMovementPacket(session, true);
|
sendClientPlayerMovementPacket(session, true);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundLo
|
|||||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundPlayerPositionPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundPlayerPositionPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundSetHealthPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundSetHealthPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.*;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.*;
|
||||||
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.level.ServerboundAcceptTeleportationPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerPosRotPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerPosRotPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerStatusOnlyPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerStatusOnlyPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundSetCarriedItemPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundSetCarriedItemPacket;
|
||||||
@ -97,6 +98,8 @@ public class PacketHandler implements cn.serendipityr.EndMinecraftPlusV2.Multipl
|
|||||||
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
||||||
TcpClientSession session = (TcpClientSession) client;
|
TcpClientSession session = (TcpClientSession) client;
|
||||||
ClientboundPlayerPositionPacket packet = (ClientboundPlayerPositionPacket) recvPacket;
|
ClientboundPlayerPositionPacket packet = (ClientboundPlayerPositionPacket) recvPacket;
|
||||||
|
ServerboundAcceptTeleportationPacket acceptTeleportationPacket = new ServerboundAcceptTeleportationPacket(packet.getTeleportId());
|
||||||
|
((TcpClientSession) client).send(acceptTeleportationPacket);
|
||||||
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
||||||
sendClientPlayerMovementPacket(session, true);
|
sendClientPlayerMovementPacket(session, true);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundSy
|
|||||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundPlayerPositionPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundPlayerPositionPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundSetHealthPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundSetHealthPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.*;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.*;
|
||||||
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.level.ServerboundAcceptTeleportationPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerPosRotPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerPosRotPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerStatusOnlyPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerStatusOnlyPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundSetCarriedItemPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundSetCarriedItemPacket;
|
||||||
@ -95,6 +96,8 @@ public class PacketHandler implements cn.serendipityr.EndMinecraftPlusV2.Multipl
|
|||||||
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
||||||
TcpClientSession session = (TcpClientSession) client;
|
TcpClientSession session = (TcpClientSession) client;
|
||||||
ClientboundPlayerPositionPacket packet = (ClientboundPlayerPositionPacket) recvPacket;
|
ClientboundPlayerPositionPacket packet = (ClientboundPlayerPositionPacket) recvPacket;
|
||||||
|
ServerboundAcceptTeleportationPacket acceptTeleportationPacket = new ServerboundAcceptTeleportationPacket(packet.getTeleportId());
|
||||||
|
((TcpClientSession) client).send(acceptTeleportationPacket);
|
||||||
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
||||||
sendClientPlayerMovementPacket(session, true);
|
sendClientPlayerMovementPacket(session, true);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundSy
|
|||||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundPlayerPositionPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundPlayerPositionPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundSetHealthPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundSetHealthPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.*;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.*;
|
||||||
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.level.ServerboundAcceptTeleportationPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerPosRotPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerPosRotPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerStatusOnlyPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerStatusOnlyPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundSetCarriedItemPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundSetCarriedItemPacket;
|
||||||
@ -95,6 +96,8 @@ public class PacketHandler implements cn.serendipityr.EndMinecraftPlusV2.Multipl
|
|||||||
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
||||||
TcpClientSession session = (TcpClientSession) client;
|
TcpClientSession session = (TcpClientSession) client;
|
||||||
ClientboundPlayerPositionPacket packet = (ClientboundPlayerPositionPacket) recvPacket;
|
ClientboundPlayerPositionPacket packet = (ClientboundPlayerPositionPacket) recvPacket;
|
||||||
|
ServerboundAcceptTeleportationPacket acceptTeleportationPacket = new ServerboundAcceptTeleportationPacket(packet.getTeleportId());
|
||||||
|
((TcpClientSession) client).send(acceptTeleportationPacket);
|
||||||
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
||||||
sendClientPlayerMovementPacket(session, true);
|
sendClientPlayerMovementPacket(session, true);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundSy
|
|||||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundPlayerPositionPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundPlayerPositionPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundSetHealthPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.player.ClientboundSetHealthPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.*;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.*;
|
||||||
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.level.ServerboundAcceptTeleportationPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerPosRotPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerPosRotPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerStatusOnlyPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerStatusOnlyPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundSetCarriedItemPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundSetCarriedItemPacket;
|
||||||
@ -95,6 +96,8 @@ public class PacketHandler implements cn.serendipityr.EndMinecraftPlusV2.Multipl
|
|||||||
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
||||||
TcpClientSession session = (TcpClientSession) client;
|
TcpClientSession session = (TcpClientSession) client;
|
||||||
ClientboundPlayerPositionPacket packet = (ClientboundPlayerPositionPacket) recvPacket;
|
ClientboundPlayerPositionPacket packet = (ClientboundPlayerPositionPacket) recvPacket;
|
||||||
|
ServerboundAcceptTeleportationPacket acceptTeleportationPacket = new ServerboundAcceptTeleportationPacket(packet.getTeleportId());
|
||||||
|
((TcpClientSession) client).send(acceptTeleportationPacket);
|
||||||
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
||||||
sendClientPlayerMovementPacket(session, true);
|
sendClientPlayerMovementPacket(session, true);
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundCh
|
|||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundChatPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundChatPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundClientCommandPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundClientCommandPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundCommandSuggestionPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundCommandSuggestionPacket;
|
||||||
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.level.ServerboundAcceptTeleportationPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerPosRotPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerPosRotPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerStatusOnlyPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerStatusOnlyPacket;
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundSetCarriedItemPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.player.ServerboundSetCarriedItemPacket;
|
||||||
@ -102,6 +103,8 @@ public class PacketHandler implements cn.serendipityr.EndMinecraftPlusV2.Multipl
|
|||||||
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
||||||
TcpClientSession session = (TcpClientSession) client;
|
TcpClientSession session = (TcpClientSession) client;
|
||||||
ClientboundPlayerPositionPacket packet = (ClientboundPlayerPositionPacket) recvPacket;
|
ClientboundPlayerPositionPacket packet = (ClientboundPlayerPositionPacket) recvPacket;
|
||||||
|
ServerboundAcceptTeleportationPacket acceptTeleportationPacket = new ServerboundAcceptTeleportationPacket(packet.getTeleportId());
|
||||||
|
((TcpClientSession) client).send(acceptTeleportationPacket);
|
||||||
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
||||||
sendClientPlayerMovementPacket(session, true);
|
sendClientPlayerMovementPacket(session, true);
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ import org.spacehq.mc.protocol.packet.ingame.client.*;
|
|||||||
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientChangeHeldItemPacket;
|
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientChangeHeldItemPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
||||||
|
import org.spacehq.mc.protocol.packet.ingame.client.window.ClientConfirmTransactionPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerChatPacket;
|
import org.spacehq.mc.protocol.packet.ingame.server.ServerChatPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
import org.spacehq.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
import org.spacehq.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
||||||
|
@ -20,6 +20,7 @@ import org.spacehq.mc.protocol.packet.ingame.client.*;
|
|||||||
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerChangeHeldItemPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerMovementPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
import org.spacehq.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
||||||
|
import org.spacehq.mc.protocol.packet.ingame.client.world.ClientTeleportConfirmPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerChatPacket;
|
import org.spacehq.mc.protocol.packet.ingame.server.ServerChatPacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
import org.spacehq.mc.protocol.packet.ingame.server.ServerJoinGamePacket;
|
||||||
import org.spacehq.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
import org.spacehq.mc.protocol.packet.ingame.server.ServerKeepAlivePacket;
|
||||||
@ -112,6 +113,8 @@ public class PacketHandler implements cn.serendipityr.EndMinecraftPlusV2.Multipl
|
|||||||
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
public void handleServerPlayerPositionRotationPacket(Object client, Object recvPacket, String username) {
|
||||||
Session session = ((Client) client).getSession();
|
Session session = ((Client) client).getSession();
|
||||||
ServerPlayerPositionRotationPacket packet = (ServerPlayerPositionRotationPacket) recvPacket;
|
ServerPlayerPositionRotationPacket packet = (ServerPlayerPositionRotationPacket) recvPacket;
|
||||||
|
ClientTeleportConfirmPacket teleportConfirmPacket = new ClientTeleportConfirmPacket(packet.getTeleportId());
|
||||||
|
session.send(teleportConfirmPacket);
|
||||||
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
sendPositionRotationPacket(session, packet.getX(), packet.getY(), packet.getZ(), packet.getYaw(), packet.getYaw());
|
||||||
sendClientPlayerMovementPacket(session, true);
|
sendClientPlayerMovementPacket(session, true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user