mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
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:
parent
8e9459eadc
commit
1ea9ada0da
1 changed files with 2 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue