-
Bug
-
Resolution: Awaiting Response
-
None
-
1.17.1, 21w41a
-
None
-
Plausible
-
(Unassigned)
ServerPlayNetworkHandler#onTeleportConfirm (yarn name) does not check that this.requestedTeleportPos is non-null. A modded client can send TeleportConfirmC2SPacket with the teleport confirmation ID (usually 1 after logging in) to vanilla server, which will log fatal error (NullPointerException inside that method) on the server. However, this does not seem to actually crash the server. Since there is already a check for the confirmation ID, adding && this.requestedTeleportPos != null to that if-clause should be enough.
Relates to MC-200000
public void onTeleportConfirm(TeleportConfirmC2SPacket packet) { // Omitted unrelated code // There should be a check for this.requestedTeleportPos here if (packet.getTeleportId() == this.requestedTeleportId) { this.player.updatePositionAndAngles(this.requestedTeleportPos.x, this.requestedTeleportPos.y, this.requestedTeleportPos.z, this.player.getYaw(), this.player.getPitch()); // NPE here } }