Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package bleachcraft.worldGen;
- import java.util.Random;
- import net.minecraft.util.math.BlockPos;
- import net.minecraft.world.World;
- import net.minecraft.world.chunk.IChunkGenerator;
- import net.minecraft.world.chunk.IChunkProvider;
- import net.minecraft.world.gen.feature.WorldGenMinable;
- import net.minecraftforge.fml.common.IWorldGenerator;
- public class WorldGenChlorineBlock implements IWorldGenerator
- {
- @Override
- public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator,IChunkProvider chunkProvider) {
- switch(world.provider.getDimension()){
- case 0:
- generateSurface(world, random, chunkX*16, chunkZ*16);
- break;
- }
- }
- private void generateSurface(World world, Random rand, int chunkX, int chunkZ) {
- for (int i = 0; i < 16; i++){
- int randPosXX = chunkX + rand.nextInt(16);
- int randPosYY = rand.nextInt(48);
- int randPosZZ = chunkZ + rand.nextInt(16);
- BlockPos pos = new BlockPos(randPosXX,randPosYY,randPosZZ);
- new WorldGenMinable(bleachcraft.fluids.ChlorineBlock.instance.getBlockState(), 10)).generate(world, rand, pos);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement