Search in sources :

Example 16 with FullChunk

use of cn.nukkit.level.format.FullChunk in project Nukkit by Nukkit.

the class Normal method populateChunk.

@Override
public void populateChunk(int chunkX, int chunkZ) {
    this.nukkitRandom.setSeed(0xdeadbeef ^ (chunkX << 8) ^ chunkZ ^ this.level.getSeed());
    for (Populator populator : this.populators) {
        populator.populate(this.level, chunkX, chunkZ, this.nukkitRandom);
    }
    FullChunk chunk = this.level.getChunk(chunkX, chunkZ);
    Biome biome = Biome.getBiome(chunk.getBiomeId(7, 7));
    biome.populateChunk(this.level, chunkX, chunkZ, this.nukkitRandom);
}
Also used : FullChunk(cn.nukkit.level.format.FullChunk) Biome(cn.nukkit.level.generator.biome.Biome)

Aggregations

FullChunk (cn.nukkit.level.format.FullChunk)16 BaseFullChunk (cn.nukkit.level.format.generic.BaseFullChunk)8 Biome (cn.nukkit.level.generator.biome.Biome)5 BlockEntity (cn.nukkit.blockentity.BlockEntity)4 Entity (cn.nukkit.entity.Entity)4 Long2ObjectMap (it.unimi.dsi.fastutil.longs.Long2ObjectMap)4 Block (cn.nukkit.block.Block)3 CompoundTag (cn.nukkit.nbt.tag.CompoundTag)3 Int2ObjectOpenHashMap (it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap)3 Long2ObjectOpenHashMap (it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap)3 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)3 ItemBlock (cn.nukkit.item.ItemBlock)2 DoubleTag (cn.nukkit.nbt.tag.DoubleTag)2 FloatTag (cn.nukkit.nbt.tag.FloatTag)2 ListTag (cn.nukkit.nbt.tag.ListTag)2 Player (cn.nukkit.Player)1 EntityPainting (cn.nukkit.entity.item.EntityPainting)1 Chunk (cn.nukkit.level.format.Chunk)1 ChunkSection (cn.nukkit.level.format.ChunkSection)1 LevelProvider (cn.nukkit.level.format.LevelProvider)1