use of net.minecraft.world.biome.Biome in project MorePlanets by SteveKunG.
the class MapGenChalosRavine method digBlock.
protected void digBlock(ChunkPrimer data, int x, int y, int z, int chunkX, int chunkZ, boolean foundTop) {
Biome biome = this.world.getBiome(new BlockPos(x + chunkX * 16, 0, z + chunkZ * 16));
IBlockState state = data.getBlockState(x, y, z);
IBlockState top = biome.topBlock;
IBlockState filler = biome.fillerBlock;
if (state.getBlock() == ChalosBlocks.CHALOS_BLOCK || state.getBlock() == top.getBlock() || state.getBlock() == filler.getBlock()) {
if (y < 10) {
data.setBlockState(x, y, z, Blocks.LAVA.getDefaultState());
} else {
data.setBlockState(x, y, z, Blocks.AIR.getDefaultState());
if (foundTop && data.getBlockState(x, y - 1, z).getBlock() == filler.getBlock()) {
data.setBlockState(x, y - 1, z, top.getBlock().getDefaultState());
}
}
}
}
use of net.minecraft.world.biome.Biome in project MorePlanets by SteveKunG.
the class MapGenNibiruRavine method digBlock.
protected void digBlock(ChunkPrimer data, int x, int y, int z, int chunkX, int chunkZ, boolean foundTop) {
Biome biome = this.world.getBiome(new BlockPos(x + chunkX * 16, 0, z + chunkZ * 16));
IBlockState state = data.getBlockState(x, y, z);
IBlockState top = this.isExceptionBiome(biome) ? NibiruBlocks.INFECTED_GRASS.getDefaultState() : biome.topBlock;
IBlockState filler = this.isExceptionBiome(biome) ? NibiruBlocks.INFECTED_DIRT.getDefaultState() : biome.fillerBlock;
if (state.getBlock() == NibiruBlocks.NIBIRU_BLOCK || state.getBlock() == NibiruBlocks.NIBIRU_ORE || state.getBlock() == top.getBlock() || state.getBlock() == filler.getBlock()) {
if (y < 10) {
data.setBlockState(x, y, z, Blocks.LAVA.getDefaultState());
} else {
data.setBlockState(x, y, z, Blocks.AIR.getDefaultState());
if (foundTop && data.getBlockState(x, y - 1, z).getBlock() == filler.getBlock()) {
data.setBlockState(x, y - 1, z, top.getBlock().getDefaultState());
}
}
}
}
use of net.minecraft.world.biome.Biome in project MorePlanets by SteveKunG.
the class ChunkGeneratorNibiru method replaceBlocksForBiome.
public void replaceBlocksForBiome(int chunkX, int chunkZ, ChunkPrimer chunkPrimer, Biome[] biome) {
double d0 = 0.03125D;
this.depthBuffer = this.surfaceNoise.getRegion(this.depthBuffer, chunkX * 16, chunkZ * 16, 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
for (int i = 0; i < 16; ++i) {
for (int j = 0; j < 16; ++j) {
Biome biomegenbase = biome[j + i * 16];
biomegenbase.genTerrainBlocks(this.worldObj, this.rand, chunkPrimer, chunkX * 16 + i, chunkZ * 16 + j, this.depthBuffer[j + i * 16]);
}
}
}
use of net.minecraft.world.biome.Biome in project MorePlanets by SteveKunG.
the class MapGenNibiruCaves method isTopBlock.
private boolean isTopBlock(ChunkPrimer data, int x, int y, int z, int chunkX, int chunkZ) {
Biome biome = this.world.getBiome(new BlockPos(x + chunkX * 16, 0, z + chunkZ * 16));
IBlockState state = data.getBlockState(x, y, z);
return this.isExceptionBiome(biome) ? state.getBlock() == NibiruBlocks.INFECTED_GRASS : state.getBlock() == biome.topBlock;
}
use of net.minecraft.world.biome.Biome in project MorePlanets by SteveKunG.
the class MapGenNibiruRavine method isTopBlock.
private boolean isTopBlock(ChunkPrimer data, int x, int y, int z, int chunkX, int chunkZ) {
Biome biome = this.world.getBiome(new BlockPos(x + chunkX * 16, 0, z + chunkZ * 16));
IBlockState state = data.getBlockState(x, y, z);
return this.isExceptionBiome(biome) ? state.getBlock() == NibiruBlocks.INFECTED_GRASS : state.getBlock() == biome.topBlock;
}
Aggregations