Upstream Update (#5211)

This commit is contained in:
MiniDigger | Martin
2021-02-21 21:55:01 +01:00
parent 8bafdd49dc
commit db0dd75a20
21 changed files with 43 additions and 91 deletions

View File

@@ -3993,24 +3993,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ public final boolean isEntityTickingReady() {
+ return this.isEntityTickingReady;
}
+ }
+
+ public final boolean isTickingReady() {
+ return this.isTickingReady;
+ }
+
+ public final boolean isFullChunkReady() {
+ return this.isFullChunkReady;
+ }
}
+ // Paper end
+
// CraftBukkit start
- public Chunk getFullChunk() {
+ public final Chunk getFullChunk() { // Paper - final for inline
if (!getChunkState(this.oldTicketLevel).isAtLeast(PlayerChunk.State.BORDER)) return null; // note: using oldTicketLevel for isLoaded checks
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> statusFuture = this.getStatusFutureUnchecked(ChunkStatus.FULL);
Either<IChunkAccess, PlayerChunk.Failure> either = (Either<IChunkAccess, PlayerChunk.Failure>) statusFuture.getNow(null);
return either == null ? null : (Chunk) either.left().orElse(null);
return this.getFullChunkUnchecked();
}
@@ -0,0 +0,0 @@ public class PlayerChunk {
return (either == null) ? null : (Chunk) either.left().orElse(null);
}
// CraftBukkit end
+ // Paper start - "real" get full chunk immediately