From 1ea9ada0da08e19610308e94c889a840f25add1f Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 10 May 2020 23:58:04 -0400 Subject: [PATCH] Add a TELEPORT ticket when changing dimensions This should fix any remaining issues around collision issues on chunk edges when changing dimensions sending to Y 256 --- .../0453-Optimize-Collision-to-not-load-chunks.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch index d36f6ce9db..26667627ad 100644 --- a/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch +++ b/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch @@ -62,14 +62,14 @@ index f851ed11df14fd9aa8017f44d82fb6cfc3bde345..8b0670b8db0bb739fb54fee368a53ead if ((j2 != 1 || iblockdata.f()) && (j2 != 2 || iblockdata.getBlock() == Blocks.MOVING_PISTON)) { VoxelShape voxelshape2 = iblockdata.b((IBlockAccess) ICollisionAccess.this, blockposition_mutableblockposition, voxelshapecollision); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 909d86e14c7860cd6d8a6f38ef4aedb183acae3f..fddd92677db06aa9fc41437f34719d9ae6e44c93 100644 +index 909d86e14c7860cd6d8a6f38ef4aedb183acae3f..b2c2d56e2be893dac5eb13d6648c5df65eb3ea4e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -677,6 +677,7 @@ public abstract class PlayerList { entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); // CraftBukkit end -+ location.getChunk(); // Paper - force load chunk to be sure getCubes works ++ worldserver.getChunkProvider().addTicket(TicketType.POST_TELEPORT, new ChunkCoordIntPair(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper while (avoidSuffocation && !worldserver.getCubes(entityplayer1) && entityplayer1.locY() < 256.0D) { entityplayer1.setPosition(entityplayer1.locX(), entityplayer1.locY() + 1.0D, entityplayer1.locZ()); }