use of net.minecraft.world.chunk.ChunkPrimer in project MorePlanets by SteveKunG.
the class ChunkProviderDiona method generateChunk.
@Override
public Chunk generateChunk(int chunkX, int chunkZ) {
ChunkPrimer primer = new ChunkPrimer();
this.rand.setSeed(chunkX * 341873128712L + chunkZ * 132897987541L);
this.generateTerrain(chunkX, chunkZ, primer);
this.biomesForGeneration = this.worldObj.getBiomeProvider().getBiomes(this.biomesForGeneration, chunkX * 16, chunkZ * 16, 16, 16);
this.createCraters(chunkX, chunkZ, primer);
this.replaceBiomeBlocks(chunkX, chunkZ, primer, this.biomesForGeneration);
this.caveGenerator.generate(this.worldObj, chunkX, chunkZ, primer);
this.mineshaftGenerator.generate(this.worldObj, chunkX, chunkZ, primer);
this.dungeonGenerator.generate(this.worldObj, chunkX, chunkZ, primer);
Chunk chunk = new Chunk(this.worldObj, primer, chunkX, chunkZ);
chunk.generateSkylightMap();
return chunk;
}
use of net.minecraft.world.chunk.ChunkPrimer in project MorePlanets by SteveKunG.
the class ChunkGeneratorChalos method generateChunk.
@Override
public Chunk generateChunk(int chunkX, int chunkZ) {
this.rand.setSeed(chunkX * 341873128712L + chunkZ * 132897987541L);
ChunkPrimer chunkprimer = new ChunkPrimer();
this.setBlocksInChunk(chunkX, chunkZ, chunkprimer);
this.biomesForGeneration = this.worldObj.getBiomeProvider().getBiomes(this.biomesForGeneration, chunkX * 16, chunkZ * 16, 16, 16);
this.replaceBlocksForBiome(chunkX, chunkZ, chunkprimer, this.biomesForGeneration);
this.caveGenerator.generate(this.worldObj, chunkX, chunkZ, chunkprimer);
this.ravineGenerator.generate(this.worldObj, chunkX, chunkZ, chunkprimer);
Chunk chunk = new Chunk(this.worldObj, chunkprimer, chunkX, chunkZ);
byte[] abyte = chunk.getBiomeArray();
for (int i = 0; i < abyte.length; ++i) {
abyte[i] = (byte) Biome.getIdForBiome(this.biomesForGeneration[i]);
}
chunk.generateSkylightMap();
return chunk;
}
use of net.minecraft.world.chunk.ChunkPrimer in project SpongeCommon by SpongePowered.
the class MixinChunkGeneratorEnd method populate.
@Override
public void populate(World world, MutableBlockVolume buffer, ImmutableBiomeVolume biomes) {
int x = GenericMath.floor(buffer.getBlockMin().getX() / 16f);
int z = GenericMath.floor(buffer.getBlockMin().getZ() / 16f);
ChunkPrimer chunkprimer = new ChunkBufferPrimer(buffer);
this.rand.setSeed((long) x * 341873128712L + (long) z * 132897987541L);
this.setBlocksInChunk(x, z, chunkprimer);
}
use of net.minecraft.world.chunk.ChunkPrimer in project Charset by CharsetMC.
the class ChunkGeneratorCharsetVoid method generateChunk.
@Override
public Chunk generateChunk(int x, int z) {
ChunkPrimer primer = new ChunkPrimer();
Chunk chunk = new Chunk(world, primer, x, z);
byte[] biomeArray = chunk.getBiomeArray();
byte biomeId = (byte) Biome.getIdForBiome(Biomes.FOREST);
for (int i = 0; i < biomeArray.length; i++) {
biomeArray[i] = biomeId;
}
return chunk;
}
use of net.minecraft.world.chunk.ChunkPrimer in project Wizardry by TeamWizardry.
the class ChunkGeneratorTorikki method generateChunk.
@Nonnull
@Override
public Chunk generateChunk(int x, int z) {
ChunkPrimer chunkprimer = new ChunkPrimer();
generate(x, z, chunkprimer);
Chunk chunk = new Chunk(world, chunkprimer, x, z);
byte[] biomeArray = chunk.getBiomeArray();
for (int i = 0; i < biomeArray.length; ++i) {
biomeArray[i] = (byte) 42;
}
chunk.generateSkylightMap();
return chunk;
}
Aggregations