From 9253ea8b428e5bcd54737c69cabeccf01ae1c82b Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Thu, 4 Jul 2024 16:20:03 +0200 Subject: [PATCH] Fix respawn error due to null location Closes #11017 --- patches/server/Optimize-Collision-to-not-load-chunks.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/server/Optimize-Collision-to-not-load-chunks.patch b/patches/server/Optimize-Collision-to-not-load-chunks.patch index 0c3bd2e6f8..ce315b5972 100644 --- a/patches/server/Optimize-Collision-to-not-load-chunks.patch +++ b/patches/server/Optimize-Collision-to-not-load-chunks.patch @@ -21,7 +21,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 Vec3 vec3d = dimensiontransition.pos(); entityplayer1.forceSetPositionRotation(vec3d.x, vec3d.y, vec3d.z, dimensiontransition.yRot(), dimensiontransition.xRot()); -+ worldserver.getChunkSource().addRegionTicket(net.minecraft.server.level.TicketType.POST_TELEPORT, new net.minecraft.world.level.ChunkPos(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper ++ worldserver.getChunkSource().addRegionTicket(net.minecraft.server.level.TicketType.POST_TELEPORT, new net.minecraft.world.level.ChunkPos(net.minecraft.util.Mth.floor(vec3d.x()) >> 4, net.minecraft.util.Mth.floor(vec3d.z()) >> 4), 1, entityplayer.getId()); // Paper // CraftBukkit end if (dimensiontransition.missingRespawnBlock()) { entityplayer1.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.NO_RESPAWN_BLOCK_AVAILABLE, 0.0F));