Search in sources :

Example 6 with EntityPig

use of net.minecraft.entity.passive.EntityPig in project Traverse by ProfessorProspector.

the class BiomeMiniJungle method decorate.

public void decorate(World worldIn, Random rand, BlockPos pos) {
    super.decorate(worldIn, rand, pos);
    int i = rand.nextInt(16) + 8;
    int j = rand.nextInt(16) + 8;
    // could == 0, which crashes nextInt
    int height = worldIn.getHeight(pos.add(i, 0, j)).getY() * 2;
    if (height < 1)
        height = 1;
    int k = rand.nextInt(height);
    if (net.minecraftforge.event.terraingen.TerrainGen.decorate(worldIn, rand, pos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.PUMPKIN))
        (new WorldGenMelon()).generate(worldIn, rand, pos.add(i, k, j));
    WorldGenVines worldgenvines = new WorldGenVines();
    if (net.minecraftforge.event.terraingen.TerrainGen.decorate(worldIn, rand, pos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.GRASS))
        for (j = 0; j < 50; ++j) {
            k = rand.nextInt(16) + 8;
            int l = 128;
            int i1 = rand.nextInt(16) + 8;
            worldgenvines.generate(worldIn, rand, pos.add(k, 128, i1));
            EntityPig pig = new EntityPig(worldIn);
        }
}
Also used : EntityPig(net.minecraft.entity.passive.EntityPig)

Aggregations

EntityPig (net.minecraft.entity.passive.EntityPig)6 EntityPigZombie (net.minecraft.entity.monster.EntityPigZombie)3 EntityZombie (net.minecraft.entity.monster.EntityZombie)3 EntityVillager (net.minecraft.entity.passive.EntityVillager)2 AxisAlignedBB (net.minecraft.util.AxisAlignedBB)2 Vector (ValkyrienWarfareBase.API.Vector)1 PhysicsWrapperEntity (ValkyrienWarfareBase.PhysicsManagement.PhysicsWrapperEntity)1 EntityMountingWeaponBase (ValkyrienWarfareCombat.Entity.EntityMountingWeaponBase)1 Pos (com.builtbroken.mc.imp.transform.vector.Pos)1 SubscribeEvent (cpw.mods.fml.common.eventhandler.SubscribeEvent)1 Entity (net.minecraft.entity.Entity)1 EntityAgeable (net.minecraft.entity.EntityAgeable)1 EntityLiving (net.minecraft.entity.EntityLiving)1 EntityLivingBase (net.minecraft.entity.EntityLivingBase)1 EntityArmorStand (net.minecraft.entity.item.EntityArmorStand)1 EntityBoat (net.minecraft.entity.item.EntityBoat)1 EntityFallingBlock (net.minecraft.entity.item.EntityFallingBlock)1 EntityItem (net.minecraft.entity.item.EntityItem)1 EntityHorse (net.minecraft.entity.passive.EntityHorse)1 ItemStack (net.minecraft.item.ItemStack)1