Update upstream

This commit is contained in:
IzzelAliz 2022-04-01 20:45:40 +08:00
parent ae3ff3d169
commit 9f74767f79
No known key found for this signature in database
GPG Key ID: EE50E123A11D8338

View File

@ -37,14 +37,14 @@ public abstract class ChunkHolderMixin implements ChunkHolderBridge {
@Override @Accessor("oldTicketLevel") public abstract int bridge$getOldTicketLevel();
// @formatter:on
public LevelChunk getFullChunk() {
public LevelChunk getFullChunkNow() {
if (!ChunkHolder.getFullChunkStatus(this.oldTicketLevel).isOrAfter(ChunkHolder.FullChunkStatus.BORDER)) {
return null; // note: using oldTicketLevel for isLoaded checks
}
return this.getFullChunkUnchecked();
return this.getFullChunkNowUnchecked();
}
public LevelChunk getFullChunkUnchecked() {
public LevelChunk getFullChunkNowUnchecked() {
CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> statusFuture = this.getFutureIfPresentUnchecked(ChunkStatus.FULL);
Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> either = statusFuture.getNow(null);
return (either == null) ? null : (LevelChunk) either.left().orElse(null);
@ -52,12 +52,12 @@ public abstract class ChunkHolderMixin implements ChunkHolderBridge {
@Override
public LevelChunk bridge$getFullChunk() {
return this.getFullChunk();
return this.getFullChunkNow();
}
@Override
public LevelChunk bridge$getFullChunkUnchecked() {
return this.getFullChunkUnchecked();
return this.getFullChunkNowUnchecked();
}
@Inject(method = "blockChanged", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD,