Misc Improvements to Async Teleporting and Light patch
Stop light copy was missing a default in the impl. Should of been extremely low chance of impacting anything though as the very first copy operation would have fixed it. Sadly this doesn't fix the issues weve been trying to fix. Fix player async teleporting adding priority to wrong world for cross world teleports Also improve teleporting to wait for entity ticking status before teleporting to prevent neighbors loading
This commit is contained in:
@@ -1232,8 +1232,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public java.util.concurrent.CompletableFuture<Boolean> teleportAsync(Location loc, PlayerTeleportEvent.TeleportCause cause) {
|
||||
+ getHandle().getWorldServer().getChunkProvider().markAreaHighPriority(new net.minecraft.server.ChunkCoordIntPair(net.minecraft.server.MathHelper.floor(loc.getX()) >> 4, net.minecraft.server.MathHelper.floor(loc.getZ()) >> 4), 28, 3); // Paper - load area high priority
|
||||
+ public java.util.concurrent.CompletableFuture<Boolean> teleportAsync(Location loc, @javax.annotation.Nonnull PlayerTeleportEvent.TeleportCause cause) {
|
||||
+ ((CraftWorld)loc.getWorld()).getHandle().getChunkProvider().markAreaHighPriority(new net.minecraft.server.ChunkCoordIntPair(net.minecraft.server.MathHelper.floor(loc.getX()) >> 4, net.minecraft.server.MathHelper.floor(loc.getZ()) >> 4), 28, 3); // Paper - load area high priority
|
||||
+ return super.teleportAsync(loc, cause);
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
Reference in New Issue
Block a user