net.minecraft.world.chunk.ProtoChunk Java Examples

The following examples show how to use net.minecraft.world.chunk.ProtoChunk. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ChunkHolder_scarpetChunkCreationMixin.java    From fabric-carpet with MIT License 5 votes vote down vote up
@Override
public CompletableFuture<Either<Chunk, ChunkHolder.Unloaded>> setDefaultProtoChunk(ChunkPos chpos, ThreadExecutor<Runnable> executor)
{
    int i = ChunkStatus.EMPTY.getIndex();
    CompletableFuture<Either<Chunk, ChunkHolder.Unloaded>> completableFuture2 = CompletableFuture.supplyAsync(
            () -> Either.left(new ProtoChunk(chpos, UpgradeData.NO_UPGRADE_DATA)),
            executor
    );
    updateFuture(completableFuture2);
    futuresByStatus.set(i, completableFuture2);
    return completableFuture2;
}