本文整理了Java中net.minecraft.world.chunk.Chunk.isTerrainPopulated()
方法的一些代码示例,展示了Chunk.isTerrainPopulated()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Chunk.isTerrainPopulated()
方法的具体详情如下:
包路径:net.minecraft.world.chunk.Chunk
类名称:Chunk
方法名:isTerrainPopulated
暂无
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
@Override
public Chunk generateChunk( final int x, final int z )
{
final Chunk chunk = new Chunk( this.world, x, z );
final byte[] biomes = chunk.getBiomeArray();
Biome biome = AppEng.instance().getStorageBiome();
byte biomeId = (byte) Biome.getIdForBiome( biome );
for( int k = 0; k < biomes.length; ++k )
{
biomes[k] = biomeId;
}
AEApi.instance().definitions().blocks().matrixFrame().maybeBlock().ifPresent( block -> this.fillChunk( chunk, block.getDefaultState() ) );
chunk.setModified( false );
if( !chunk.isTerrainPopulated() )
{
chunk.setTerrainPopulated( true );
chunk.resetRelightChecks();
}
return chunk;
}
代码示例来源:origin: lawremi/CustomOreGen
private static boolean chunkHasBeenPopulated(World world, int chunkX, int chunkZ) {
// NOTE: We assume the chunk has been populated if it is only on disk,
// because if we load it to check, it will be populated automatically.
return chunkIsLoaded(world, chunkX, chunkZ) ?
world.getChunkFromChunkCoords(chunkX, chunkZ).isTerrainPopulated() :
chunkIsSaved(world, chunkX, chunkZ);
}
代码示例来源:origin: thraaawn/CompactMachines
compound.setLong("LastUpdate", worldIn.getTotalWorldTime());
compound.setIntArray("HeightMap", chunkIn.getHeightMap());
compound.setBoolean("TerrainPopulated", chunkIn.isTerrainPopulated());
compound.setBoolean("LightPopulated", chunkIn.isLightPopulated());
compound.setLong("InhabitedTime", chunkIn.getInhabitedTime());
内容来源于网络,如有侵权,请联系作者删除!