Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tlhpoe.rpgadditions.worldgen;
- import java.util.Random;
- import net.minecraft.block.Block;
- import net.minecraft.world.World;
- import net.minecraft.world.chunk.IChunkProvider;
- import tlhpoe.rpgadditions.helper.BlockHelper;
- import tlhpoe.rpgadditions.util.InfoUtil;
- import cpw.mods.fml.common.IWorldGenerator;
- public class WorldGenEverything implements IWorldGenerator
- {
- @Override
- public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
- {
- for(int l = 0; l < 8; ++l)
- {
- int x = chunkX + random.nextInt(16);
- int y = 128;
- int z = chunkZ + random.nextInt(16);
- while(!(world.getBlockId(x, y, z) == Block.grass.blockID))
- {--y;}
- //if(world.getBlockId(x, y, z) == Block.grass.blockID)
- //{continue;}
- world.setBlock(x, y+1, z, BlockHelper.heartFlower.blockID, 0, 2);
- InfoUtil.print("HI3");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement