下面列出了怎么用net.minecraft.world.chunk.ProtoChunk的API类实例代码及写法,或者点击链接到github查看源代码。
@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;
}