Search in sources :

Example 6 with EntityHorse

use of net.minecraft.entity.passive.EntityHorse in project Railcraft by Railcraft.

the class EntityAIHalloweenKnights method createHorse.

private EntityHorse createHorse(DifficultyInstance difficultyInstance) {
    EntityHorse entityhorse = new EntityHorse(horse.worldObj);
    entityhorse.onInitialSpawn(difficultyInstance, null);
    entityhorse.setPosition(horse.posX, horse.posY, horse.posZ);
    entityhorse.hurtResistantTime = 60;
    entityhorse.enablePersistence();
    entityhorse.setType(HorseType.SKELETON);
    entityhorse.setHorseTamed(true);
    entityhorse.setGrowingAge(0);
    entityhorse.worldObj.spawnEntityInWorld(entityhorse);
    return entityhorse;
}
Also used : EntityHorse(net.minecraft.entity.passive.EntityHorse)

Aggregations

EntityHorse (net.minecraft.entity.passive.EntityHorse)6 EntityLightningBolt (net.minecraft.entity.effect.EntityLightningBolt)2 EntitySkeleton (net.minecraft.entity.monster.EntitySkeleton)2 ItemStack (net.minecraft.item.ItemStack)2 SubscribeEvent (cpw.mods.fml.common.eventhandler.SubscribeEvent)1 Random (java.util.Random)1 EntityDragon (net.minecraft.entity.boss.EntityDragon)1 EntityWither (net.minecraft.entity.boss.EntityWither)1 EntityEnderCrystal (net.minecraft.entity.item.EntityEnderCrystal)1 EntityItem (net.minecraft.entity.item.EntityItem)1 EntityPig (net.minecraft.entity.passive.EntityPig)1 EntitySheep (net.minecraft.entity.passive.EntitySheep)1 EntityVillager (net.minecraft.entity.passive.EntityVillager)1 EntityPlayer (net.minecraft.entity.player.EntityPlayer)1 BlockPos (net.minecraft.util.math.BlockPos)1 TextComponentString (net.minecraft.util.text.TextComponentString)1 DifficultyInstance (net.minecraft.world.DifficultyInstance)1 World (net.minecraft.world.World)1 Biome (net.minecraft.world.biome.Biome)1 Test (org.junit.Test)1