use of net.minecraft.world.chunk.ChunkPrimer in project Random-Things by lumien231.
the class SpectreChunkProvider method generateChunk.
@Override
public Chunk generateChunk(int x, int z) {
ChunkPrimer chunkprimer = new ChunkPrimer();
Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z);
chunk.resetRelightChecks();
return chunk;
}
use of net.minecraft.world.chunk.ChunkPrimer in project BiomesOPlenty by Glitchfiend.
the class ChunkGeneratorOverworldBOP method generateChunk.
@Override
public Chunk generateChunk(int chunkX, int chunkZ) {
// initialize the random generator using the chunk coordinates
this.rand.setSeed((long) chunkX * 341873128712L + (long) chunkZ * 132897987541L);
// create the primer
ChunkPrimer chunkprimer = new ChunkPrimer();
// start off by adding the basic terrain shape with air stone and water blocks
this.setChunkAirStoneWater(chunkX, chunkZ, chunkprimer);
// hand over to the biomes for them to set bedrock grass and dirt
Biome[] biomes = this.world.getBiomeProvider().getBiomes(null, chunkX * 16, chunkZ * 16, 16, 16);
this.replaceBlocksForBiome(chunkX, chunkZ, chunkprimer, biomes);
// add structures
if (this.settings.useCaves) {
this.caveGenerator.generate(this.world, chunkX, chunkZ, chunkprimer);
}
if (this.settings.useRavines) {
this.ravineGenerator.generate(this.world, chunkX, chunkZ, chunkprimer);
}
if (this.mapFeaturesEnabled) {
if (this.settings.useMineShafts) {
this.mineshaftGenerator.generate(this.world, chunkX, chunkZ, chunkprimer);
}
if (this.settings.useVillages) {
this.villageGenerator.generate(this.world, chunkX, chunkZ, chunkprimer);
}
if (this.settings.useStrongholds) {
this.strongholdGenerator.generate(this.world, chunkX, chunkZ, chunkprimer);
}
if (this.settings.useTemples) {
this.scatteredFeatureGenerator.generate(this.world, chunkX, chunkZ, chunkprimer);
}
if (this.settings.useMonuments) {
this.oceanMonumentGenerator.generate(this.world, chunkX, chunkZ, chunkprimer);
}
if (this.settings.useMansions) {
this.woodlandMansionGenerator.generate(this.world, chunkX, chunkZ, chunkprimer);
}
}
// create and return the chunk
Chunk chunk = new Chunk(this.world, chunkprimer, chunkX, chunkZ);
byte[] chunkBiomes = chunk.getBiomeArray();
for (int k = 0; k < chunkBiomes.length; ++k) {
chunkBiomes[k] = (byte) Biome.getIdForBiome(biomes[k]);
}
chunk.generateSkylightMap();
return chunk;
}
use of net.minecraft.world.chunk.ChunkPrimer in project Galacticraft by micdoodle8.
the class ChunkProviderAsteroids method generateChunk.
@Override
public Chunk generateChunk(int par1, int par2) {
ChunkPrimer primer = new ChunkPrimer();
// long time1 = System.nanoTime();
this.rand.setSeed(par1 * 341873128712L + par2 * 132897987541L);
// final Block[] ids = new Block[65536];
// final byte[] meta = new byte[65536];
this.generateTerrain(par1, par2, primer, false);
if (this.world.provider instanceof WorldProviderAsteroids && ((WorldProviderAsteroids) this.world.provider).checkHasAsteroids()) {
this.dungeonGenerator.generate(this.world, par1, par2, primer);
}
// long time2 = System.nanoTime();
final Chunk var4 = new Chunk(this.world, primer, par1, par2);
final byte[] biomesArray = var4.getBiomeArray();
final byte b = (byte) Biome.getIdForBiome(BiomeAdaptive.biomeDefault);
for (int i = 0; i < biomesArray.length; ++i) {
biomesArray[i] = b;
}
// long time3 = System.nanoTime();
this.generateSkylightMap(var4, par1, par2);
// }
return var4;
}
use of net.minecraft.world.chunk.ChunkPrimer in project Galacticraft by micdoodle8.
the class ChunkProviderOrbit method generateChunk.
@Override
public Chunk generateChunk(int par1, int par2) {
ChunkPrimer chunkprimer = new ChunkPrimer();
this.rand.setSeed(par1 * 341873128712L + par2 * 132897987541L);
final Chunk var4 = new Chunk(this.world, chunkprimer, par1, par2);
final byte b = (byte) Biome.getIdForBiome(BiomeAdaptive.biomeDefault);
final byte[] biomesArray = var4.getBiomeArray();
for (int i = 0; i < biomesArray.length; ++i) {
biomesArray[i] = b;
}
var4.generateSkylightMap();
return var4;
}
use of net.minecraft.world.chunk.ChunkPrimer in project Galacticraft by micdoodle8.
the class ChunkProviderVenus method generateChunk.
@Override
public Chunk generateChunk(int x, int z) {
this.rand.setSeed((long) x * 341873128712L + (long) z * 132897987541L);
ChunkPrimer chunkprimer = new ChunkPrimer();
this.setBlocksInChunk(x, z, chunkprimer);
this.biomesForGeneration = this.world.getBiomeProvider().getBiomes(this.biomesForGeneration, x * 16, z * 16, 16, 16);
this.caveGenerator.generate(this.world, x, z, chunkprimer);
this.lavaCaveGenerator.generate(this.world, x, z, chunkprimer);
this.replaceBlocksForBiome(x, z, chunkprimer, this.biomesForGeneration);
this.dungeonGenerator.generate(this.world, x, z, chunkprimer);
Chunk chunk = new Chunk(this.world, chunkprimer, x, z);
byte[] abyte = chunk.getBiomeArray();
for (int i = 0; i < abyte.length; ++i) {
abyte[i] = (byte) Biome.getIdForBiome(this.biomesForGeneration[i]);
}
chunk.generateSkylightMap();
return chunk;
}
Aggregations