Class EntityHorse

  • All Implemented Interfaces:
    IAnimals, IInvBasic, org.teavm.jso.JSObject

    public class EntityHorse
    extends EntityAnimal
    implements IInvBasic
    + This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
    • Field Detail

      • field_110278_bp

        public int field_110278_bp
      • field_110279_bq

        public int field_110279_bq
      • horseJumping

        protected boolean horseJumping
      • temper

        protected int temper
      • jumpPower

        protected float jumpPower
    • Constructor Detail

      • EntityHorse

        public EntityHorse​(World worldIn)
    • Method Detail

      • setHorseType

        public void setHorseType​(int type)
      • getHorseType

        public int getHorseType()
        + Returns the horse type. 0 = Normal, 1 = Donkey, 2 = Mule, 3 = Undead Horse, 4 = Skeleton Horse
      • setHorseVariant

        public void setHorseVariant​(int variant)
      • getHorseVariant

        public int getHorseVariant()
      • getName

        public java.lang.String getName()
        + Gets the name of this command sender (usually username, but possibly "Rcon")
        Overrides:
        getName in class Entity
      • isAdultHorse

        public boolean isAdultHorse()
      • isTame

        public boolean isTame()
      • func_110253_bW

        public boolean func_110253_bW()
      • getOwnerId

        public java.lang.String getOwnerId()
        + Gets the horse's owner
      • setOwnerId

        public void setOwnerId​(java.lang.String id)
      • getHorseSize

        public float getHorseSize()
      • setScaleForAge

        public void setScaleForAge​(boolean flag)
        + "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 tamed)
      • setHorseJumping

        public void setHorseJumping​(boolean jumping)
      • isChested

        public boolean isChested()
      • getHorseArmorIndexSynced

        public int getHorseArmorIndexSynced()
        + Returns type of armor from DataWatcher (0 = iron, 1 = gold, 2 = diamond)
      • isEatingHaystack

        public boolean isEatingHaystack()
      • isRearing

        public boolean isRearing()
      • isBreeding

        public boolean isBreeding()
      • getHasReproduced

        public boolean getHasReproduced()
      • setHorseArmorStack

        public void setHorseArmorStack​(ItemStack itemStackIn)
        + Set horse armor stack (for example: new ItemStack(Items.iron_horse_armor))
      • setBreeding

        public void setBreeding​(boolean breeding)
      • setChested

        public void setChested​(boolean chested)
      • setHasReproduced

        public void setHasReproduced​(boolean hasReproducedIn)
      • setHorseSaddled

        public void setHorseSaddled​(boolean saddled)
      • getTemper

        public int getTemper()
      • setTemper

        public void setTemper​(int temperIn)
      • increaseTemper

        public int increaseTemper​(int parInt1)
      • 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()
      • onInventoryChanged

        public void onInventoryChanged​(InventoryBasic var1)
        + 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 entityIn,
                                              double distance)
      • getHorseJumpStrength

        public double getHorseJumpStrength()
      • getDeathSound

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

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

        public boolean isHorseSaddled()
      • getLivingSound

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

        protected java.lang.String getAngrySoundName()
      • 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()
      • func_175507_cI

        public boolean func_175507_cI()
      • getHorseTexture

        public java.lang.String getHorseTexture()
      • getVariantTexturePaths

        public java.lang.String[] getVariantTexturePaths()
      • openGUI

        public void openGUI​(EntityPlayer playerEntity)
      • interact

        public boolean interact​(EntityPlayer entityplayer)
        + 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
      • canWearArmor

        public boolean canWearArmor()
        + Return true if the horse entity can wear an armor
      • canCarryChest

        public boolean canCarryChest()
        + Return true if the horse entity can carry a chest.
      • isUndead

        public boolean isUndead()
        + Used to know if the horse can be leashed, if he can mate, or if we can interact with him
      • isSterile

        public boolean isSterile()
        + Return true if the horse entity is sterile (Undead || Mule)
      • isBreedingItem

        public boolean isBreedingItem​(ItemStack var1)
        + 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
      • 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 EntityAnimal
      • onUpdate

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

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

        public void setEatingHaystack​(boolean parFlag)
      • setRearing

        public void setRearing​(boolean rearing)
      • makeHorseRearWithSound

        public void makeHorseRearWithSound()
      • dropChestItems

        public void dropChestItems()
      • setTamedBy

        public boolean setTamedBy​(EntityPlayer player)
      • moveEntityWithHeading

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

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

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

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

        public IEntityLivingData onInitialSpawn​(DifficultyInstance difficultyinstance,
                                                IEntityLivingData ientitylivingdata)
        + Called only once on an entity when first time spawned, via egg, mob spawner, natural spawning etc, but not called when entity is reloaded from nbt. Mainly used for initializing attributes and inventory
        Overrides:
        onInitialSpawn in class EntityLiving
      • getGrassEatingAmount

        public float getGrassEatingAmount​(float parFloat1)
      • getRearingAmount

        public float getRearingAmount​(float parFloat1)
      • getMouthOpennessAngle

        public float getMouthOpennessAngle​(float parFloat1)
      • setJumpPower

        public void setJumpPower​(int jumpPowerIn)
      • spawnHorseParticles

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

        public static boolean isArmorItem​(Item parItem)
        + Returns true if given item is horse armor
      • isOnLadder

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