Search in sources :

Example 1 with WorldGenEggs

use of micdoodle8.mods.galacticraft.planets.mars.world.gen.WorldGenEggs in project Galacticraft by micdoodle8.

the class EventHandlerMars method onPlanetDecorated.

@SubscribeEvent
public void onPlanetDecorated(GCCoreEventPopulate.Post event) {
    if (this.eggGenerator == null) {
        this.eggGenerator = new WorldGenEggs(MarsBlocks.rock);
    }
    if (event.worldObj.provider instanceof WorldProviderMars) {
        int eggsPerChunk = 2;
        BlockPos blockpos;
        for (int eggCount = 0; eggCount < eggsPerChunk; ++eggCount) {
            blockpos = event.pos.add(event.rand.nextInt(16) + 8, event.rand.nextInt(104) + 24, event.rand.nextInt(16) + 8);
            this.eggGenerator.generate(event.worldObj, event.rand, blockpos);
        }
    }
}
Also used : WorldProviderMars(micdoodle8.mods.galacticraft.planets.mars.dimension.WorldProviderMars) WorldGenEggs(micdoodle8.mods.galacticraft.planets.mars.world.gen.WorldGenEggs) BlockPos(net.minecraft.util.BlockPos) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Aggregations

WorldProviderMars (micdoodle8.mods.galacticraft.planets.mars.dimension.WorldProviderMars)1 WorldGenEggs (micdoodle8.mods.galacticraft.planets.mars.world.gen.WorldGenEggs)1 BlockPos (net.minecraft.util.BlockPos)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1