use of net.minecraft.world.chunk.ChunkPrimer in project Galacticraft by micdoodle8.
the class ChunkProviderMoon method provideChunk.
@Override
public Chunk provideChunk(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.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration, x * 16, z * 16, 16, 16);
this.createCraters(x, z, chunkprimer);
this.replaceBlocksForBiome(x, z, chunkprimer, this.biomesForGeneration);
this.caveGenerator.generate(this, this.worldObj, x, z, chunkprimer);
this.dungeonGeneratorMoon.generate(this, this.worldObj, x, z, chunkprimer);
this.villageGenerator.generate(this, this.worldObj, x, z, chunkprimer);
Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z);
byte[] abyte = chunk.getBiomeArray();
for (int i = 0; i < abyte.length; ++i) {
abyte[i] = (byte) this.biomesForGeneration[i].biomeID;
}
chunk.generateSkylightMap();
return chunk;
}
use of net.minecraft.world.chunk.ChunkPrimer in project Galacticraft by micdoodle8.
the class ChunkProviderOrbit method provideChunk.
@Override
public Chunk provideChunk(int par1, int par2) {
ChunkPrimer chunkprimer = new ChunkPrimer();
this.rand.setSeed(par1 * 341873128712L + par2 * 132897987541L);
final Chunk var4 = new Chunk(this.worldObj, chunkprimer, par1, par2);
final byte[] biomesArray = var4.getBiomeArray();
for (int i = 0; i < biomesArray.length; ++i) {
biomesArray[i] = (byte) BiomeGenBaseOrbit.space.biomeID;
}
var4.generateSkylightMap();
return var4;
}
use of net.minecraft.world.chunk.ChunkPrimer in project Galacticraft by micdoodle8.
the class ChunkProviderSpace method provideChunk.
@Override
public Chunk provideChunk(int par1, int par2) {
ChunkPrimer primer = new ChunkPrimer();
try {
this.rand.setSeed(par1 * 341873128712L + par2 * 132897987541L);
// final Block[] ids = new Block[32768 * 2];
// final byte[] meta = new byte[32768 * 2];
this.generateTerrain(par1, par2, primer);
this.createCraters(par1, par2, primer);
this.biomesForGeneration = this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration, par1 * 16, par2 * 16, 16, 16);
this.replaceBlocksForBiome(par1, par2, primer, this.biomesForGeneration);
if (this.worldGenerators == null) {
this.worldGenerators = this.getWorldGenerators();
}
for (MapGenBaseMeta generator : this.worldGenerators) {
generator.generate(this, this.worldObj, par1, par2, primer);
}
this.onChunkProvide(par1, par2, primer);
} catch (Exception e) {
GCLog.severe("Error caught in planetary worldgen at coords " + par1 + "," + par2 + ". If the next 2 lines are showing an Add-On mod name, please report to that mod's author!");
e.printStackTrace();
}
final Chunk var4 = new Chunk(this.worldObj, primer, par1, par2);
final byte[] var5 = var4.getBiomeArray();
for (int var6 = 0; var6 < var5.length; ++var6) {
var5[var6] = (byte) this.biomesForGeneration[var6].biomeID;
}
var4.generateSkylightMap();
return var4;
}
use of net.minecraft.world.chunk.ChunkPrimer in project Tropicraft by Tropicraft.
the class ChunkProviderTropicraft 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.worldObj.getBiomeProvider().getBiomes(this.biomesForGeneration, x * 16, z * 16, 16, 16);
this.replaceBiomeBlocks(x, z, chunkprimer, this.biomesForGeneration);
this.volcanoGen.generate(x, z, chunkprimer);
this.groveGen.generate(x, z, chunkprimer);
this.caveGenerator.generate(this.worldObj, x, z, chunkprimer);
this.coveGen.generate(x, z, chunkprimer);
Chunk chunk = new Chunk(this.worldObj, 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;
}
use of net.minecraft.world.chunk.ChunkPrimer in project Cavern2 by kegare.
the class ChunkGeneratorCaveland method generateChunk.
@Override
public Chunk generateChunk(int chunkX, int chunkZ) {
rand.setSeed(chunkX * 341873128712L + chunkZ * 132897987541L);
biomesForGeneration = world.getBiomeProvider().getBiomes(biomesForGeneration, chunkX * 16, chunkZ * 16, 16, 16);
ChunkPrimer primer = new ChunkPrimer();
setBlocksInChunk(primer);
caveGenerator.generate(world, chunkX, chunkZ, primer);
if (CavelandConfig.generateRiver) {
ravineGenerator.generate(world, chunkX, chunkZ, primer);
}
replaceBiomeBlocks(chunkX, chunkZ, primer);
veinGenerator.generate(world, rand, biomesForGeneration, primer);
Chunk chunk = new Chunk(world, primer, chunkX, chunkZ);
byte[] biomeArray = chunk.getBiomeArray();
for (int i = 0; i < biomeArray.length; ++i) {
biomeArray[i] = (byte) Biome.getIdForBiome(biomesForGeneration[i]);
}
return chunk;
}
Aggregations