Class EntityHorse

All Implemented Interfaces:
IAnimals, IInvBasic

public class EntityHorse extends KickingAnimal implements IInvBasic
  • Field Details

    • field_110278_bp

      public int field_110278_bp
    • field_110279_bq

      public int field_110279_bq
    • horseJumping

      protected boolean horseJumping
    • temper

      protected int temper
      "The higher this value, the more likely the horse is to be tamed next time a player rides it."
    • jumpPower

      protected float jumpPower
  • Constructor Details

    • EntityHorse

      public EntityHorse(World par1World)
  • Method Details

    • entityInit

      protected void entityInit()
      Overrides:
      entityInit in class EntityAnimal
    • setHorseType

      public void setHorseType(int par1)
    • getHorseType

      public int getHorseType()
      returns the horse type
    • setHorseVariant

      public void setHorseVariant(int par1)
    • getHorseVariant

      public int getHorseVariant()
    • getEntityName

      public String getEntityName()
      Gets the username of the entity.
      Overrides:
      getEntityName in class EntityLiving
    • isAdultHorse

      public boolean isAdultHorse()
    • isTame

      public boolean isTame()
    • func_110253_bW

      public boolean func_110253_bW()
    • getOwnerName

      public String getOwnerName()
    • setOwnerName

      public void setOwnerName(String par1Str)
    • getHorseSize

      public float getHorseSize()
    • setScaleForAge

      public void setScaleForAge(boolean par1)
      "Sets the scale for an ageable entity according to the boolean parameter, which says if it's a child."
      Overrides:
      setScaleForAge in class EntityAgeable
    • isHorseJumping

      public boolean isHorseJumping()
    • setHorseTamed

      public void setHorseTamed(boolean par1)
    • setHorseJumping

      public void setHorseJumping(boolean par1)
    • allowLeashing

      public boolean allowLeashing()
      Overrides:
      allowLeashing in class EntityLiving
    • func_142017_o

      protected void func_142017_o(float par1)
      Overrides:
      func_142017_o in class EntityCreature
    • isChested

      public boolean isChested()
    • func_110241_cb

      public int func_110241_cb()
    • getHorseArmorIndex

      public int getHorseArmorIndex(ItemStack par1ItemStack)
      0 = iron, 1 = gold, 2 = diamond
    • isEatingHaystack

      public boolean isEatingHaystack()
    • isRearing

      public boolean isRearing()
    • func_110205_ce

      public boolean func_110205_ce()
    • getHasReproduced

      public boolean getHasReproduced()
    • func_110236_r

      public void func_110236_r(int par1)
    • func_110242_l

      public void func_110242_l(boolean par1)
    • setChested

      public void setChested(boolean par1)
    • setHasReproduced

      public void setHasReproduced(boolean par1)
    • setHorseSaddled

      public void setHorseSaddled(boolean par1)
    • getTemper

      public int getTemper()
    • setTemper

      public void setTemper(int par1)
    • increaseTemper

      public int increaseTemper(int par1)
    • attackEntityFrom

      public boolean attackEntityFrom(DamageSource par1DamageSource, float par2)
      Called when the entity is attacked.
      Overrides:
      attackEntityFrom in class EntityAnimal
    • getTotalArmorValue

      public int getTotalArmorValue()
      Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
      Overrides:
      getTotalArmorValue in class EntityLivingBase
    • canBePushed

      public boolean canBePushed()
      Returns true if this entity should push and be pushed by other entities when colliding.
      Overrides:
      canBePushed in class EntityLivingBase
    • prepareChunkForSpawn

      public boolean prepareChunkForSpawn()
    • dropChests

      public void dropChests()
    • fall

      protected void fall(float par1)
      Called when the mob is falling. Calculates and applies fall damage.
      Overrides:
      fall in class EntityLivingBase
    • onInventoryChanged

      public void onInventoryChanged(InventoryBasic par1InventoryBasic)
      Called by InventoryBasic.onInventoryChanged() on a array that is never filled.
      Specified by:
      onInventoryChanged in interface IInvBasic
    • getCanSpawnHere

      public boolean getCanSpawnHere()
      Checks if the entity's current position is a valid location to spawn this entity.
      Overrides:
      getCanSpawnHere in class EntityAnimal
    • getClosestHorse

      protected EntityHorse getClosestHorse(Entity par1Entity, double par2)
    • getHorseJumpStrength

      public double getHorseJumpStrength()
    • getDeathSound

      protected String getDeathSound()
      Returns the sound this mob makes on death.
      Overrides:
      getDeathSound in class EntityLivingBase
    • getDropItemId

      protected int getDropItemId()
      Returns the item ID for the item the mob drops on death.
      Overrides:
      getDropItemId in class EntityLiving
    • getHurtSound

      protected String getHurtSound()
      Returns the sound this mob makes when it is hurt.
      Overrides:
      getHurtSound in class EntityLivingBase
    • isHorseSaddled

      public boolean isHorseSaddled()
    • getLivingSound

      protected String getLivingSound()
      Returns the sound this mob makes while it's alive.
      Overrides:
      getLivingSound in class EntityLiving
    • getAngrySoundName

      protected String getAngrySoundName()
    • playStepSound

      protected void playStepSound(int par1, int par2, int par3, int par4)
      Plays step sound at given x, y, z for the entity
      Overrides:
      playStepSound in class Entity
    • applyEntityAttributes

      protected void applyEntityAttributes()
      Overrides:
      applyEntityAttributes in class EntityLiving
    • getMaxSpawnedInChunk

      public int getMaxSpawnedInChunk()
      Will return how many at most can spawn in a chunk at once.
      Overrides:
      getMaxSpawnedInChunk in class EntityLiving
    • getMaxTemper

      public int getMaxTemper()
    • getSoundVolume

      protected float getSoundVolume()
      Returns the volume for the sounds this mob makes.
      Overrides:
      getSoundVolume in class EntityLivingBase
    • getTalkInterval

      public int getTalkInterval()
      Get number of ticks, at least during which the living entity will be silent.
      Overrides:
      getTalkInterval in class EntityAnimal
    • func_110239_cn

      public boolean func_110239_cn()
    • getHorseTexture

      public String getHorseTexture()
    • getVariantTexturePaths

      public String[] getVariantTexturePaths()
    • openGUI

      public void openGUI(EntityPlayer par1EntityPlayer)
    • interact

      public boolean interact(EntityPlayer player)
      Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
      Overrides:
      interact in class EntityAnimal
    • giveBirthAtTargetLocation

      protected void giveBirthAtTargetLocation(EntityAnimal targetMate, double dChildX, double dChildY, double dChildZ)
      Overrides:
      giveBirthAtTargetLocation in class EntityAnimal
    • stillBirth

      protected void stillBirth(EntityAnimal targetMate, double dChildX, double dChildY, double dChildZ)
    • func_110259_cr

      public boolean func_110259_cr()
    • func_110229_cs

      public boolean func_110229_cs()
    • isMovementBlocked

      protected boolean isMovementBlocked()
      Dead and sleeping entities cannot move
      Overrides:
      isMovementBlocked in class EntityLivingBase
    • func_110256_cu

      public boolean func_110256_cu()
    • func_110222_cv

      public boolean func_110222_cv()
    • isBreedingItem

      public boolean isBreedingItem(ItemStack item)
      Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)
      Overrides:
      isBreedingItem in class EntityAnimal
    • onDeath

      public void onDeath(DamageSource par1DamageSource)
      Called when the mob's health reaches 0.
      Overrides:
      onDeath in class EntityAnimal
    • dropFewItems

      protected void dropFewItems(boolean killedByPlayer, int lootingModifier)
      Description copied from class: EntityLiving
      Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param par2 - Level of Looting used to kill this mob.
      Overrides:
      dropFewItems in class EntityLiving
    • onLivingUpdate

      public void onLivingUpdate()
      Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons use this to react to sunlight and start to burn.
      Overrides:
      onLivingUpdate in class KickingAnimal
    • onUpdate

      public void onUpdate()
      Called to update the entity's position/logic.
      Overrides:
      onUpdate in class EntityLiving
    • setEating

      public void setEating(boolean par1)
      Overrides:
      setEating in class Entity
    • setEatingHaystack

      public void setEatingHaystack(boolean par1)
    • setRearing

      public void setRearing(boolean par1)
    • makeHorseRearWithSound

      public void makeHorseRearWithSound()
    • dropChestItems

      public void dropChestItems()
    • setTamedBy

      public boolean setTamedBy(EntityPlayer par1EntityPlayer)
    • moveEntityWithHeading

      public void moveEntityWithHeading(float par1, float par2)
      Moves the entity based on the specified heading. Args: strafe, forward
      Overrides:
      moveEntityWithHeading in class EntityLivingBase
    • writeEntityToNBT

      public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
      (abstract) Protected helper method to write subclass entity data to NBT.
      Overrides:
      writeEntityToNBT in class EntityAnimal
    • readEntityFromNBT

      public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
      (abstract) Protected helper method to read subclass entity data from NBT.
      Overrides:
      readEntityFromNBT in class EntityAnimal
    • canMateWith

      public boolean canMateWith(EntityAnimal par1EntityAnimal)
      Returns true if the mob is currently able to mate with the specified mob.
      Overrides:
      canMateWith in class EntityAnimal
    • createChild

      public EntityAgeable createChild(EntityAgeable par1EntityAgeable)
      Specified by:
      createChild in class EntityAgeable
    • onSpawnWithEgg

      public EntityLivingData onSpawnWithEgg(EntityLivingData par1EntityLivingData)
      Overrides:
      onSpawnWithEgg in class EntityAnimal
    • getGrassEatingAmount

      public float getGrassEatingAmount(float par1)
    • getRearingAmount

      public float getRearingAmount(float par1)
    • func_110201_q

      public float func_110201_q(float par1)
    • isAIEnabled

      protected boolean isAIEnabled()
      Returns true if the newer Entity AI code should be run
      Overrides:
      isAIEnabled in class EntityLiving
    • setJumpPower

      public void setJumpPower(int par1)
    • spawnHorseParticles

      protected void spawnHorseParticles(boolean par1)
      "Spawns particles for the horse entity. par1 tells whether to spawn hearts. If it is false, it spawns smoke."
    • handleHealthUpdate

      public void handleHealthUpdate(byte par1)
      Overrides:
      handleHealthUpdate in class EntityAnimal
    • updateRiderPosition

      public void updateRiderPosition()
      Overrides:
      updateRiderPosition in class Entity
    • func_110211_v

      public static boolean func_110211_v(int par0)
    • isOnLadder

      public boolean isOnLadder()
      returns true if this entity is by a ladder, false otherwise
      Overrides:
      isOnLadder in class EntityLivingBase
    • isValidZombieSecondaryTarget

      public boolean isValidZombieSecondaryTarget(EntityZombie zombie)
      Overrides:
      isValidZombieSecondaryTarget in class Entity
    • isSubjectToHunger

      public boolean isSubjectToHunger()
      Overrides:
      isSubjectToHunger in class EntityAnimal
    • getCanCreatureTypeBePossessed

      public boolean getCanCreatureTypeBePossessed()
      Overrides:
      getCanCreatureTypeBePossessed in class EntityCreature