Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package terramagna.worldgen;
- import java.util.Random;
- import terramagna.helper.BlockHelper;
- import net.minecraft.block.Block;
- import net.minecraft.world.World;
- import net.minecraft.world.chunk.IChunkProvider;
- 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 < 64; ++l)
- {
- int i1 = chunkX + random.nextInt(8) - random.nextInt(8);
- int j1 = + random.nextInt(4) - random.nextInt(4);
- int k1 = chunkZ + random.nextInt(8) - random.nextInt(8);
- if (world.isAirBlock(i1, j1, k1) && (!world.provider.hasNoSky || j1 < 127) && Block.blocksList[BlockHelper.heartFlower.blockID].canBlockStay(world, i1, j1, k1))
- {
- world.setBlock(i1, j1, k1, BlockHelper.heartFlower.blockID, 0, 2);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement