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
This commit is contained in:
Aikar 2020-05-10 23:58:04 -04:00
parent 80a570d89f
commit 924d46ea01

View file

@ -69,7 +69,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
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());
}