public class EntityHorse extends EntityAnimal implements IInvBasic
| Modifier and Type | Class and Description |
|---|---|
static class |
EntityHorse.GroupData |
EntityLiving.SpawnPlacementType| Modifier and Type | Field and Description |
|---|---|
int |
field_110278_bp |
int |
field_110279_bq |
protected boolean |
horseJumping |
protected float |
jumpPower |
protected int |
temper
"The higher this value, the more likely the horse is to be tamed next time a player rides it."
|
spawnableBlockfield_175502_b, field_175503_c, growingAgeFLEEING_SPEED_MODIFIER, FLEEING_SPEED_MODIFIER_UUIDequipmentDropChances, experienceValue, jumpHelper, livingSoundTime, moveHelper, navigator, targetTasks, tasksarrowHitTimer, attackedAtYaw, attackingPlayer, cameraPitch, dead, deathTime, entityAge, field_70741_aB, field_70769_ao, field_70770_ap, hurtTime, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, newPosRotationIncrements, newPosX, newPosY, newPosZ, newRotationPitch, newRotationYaw, onGroundSpeedFactor, prevCameraPitch, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, swingProgress, swingProgressIntaddedToChunk, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, extendedProperties, fallDistance, field_181016_an, field_181017_ao, field_181018_ap, fireResistance, firstUpdate, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj| Constructor and Description |
|---|
EntityHorse(World worldIn) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowLeashing() |
protected void |
applyEntityAttributes() |
boolean |
attackEntityFrom(DamageSource source,
float amount)
Called when the entity is attacked.
|
boolean |
canBePushed()
Returns true if this entity should push and be pushed by other entities when colliding.
|
boolean |
canCarryChest()
Return true if the horse entity can carry a chest.
|
boolean |
canMateWith(EntityAnimal otherAnimal)
Returns true if the mob is currently able to mate with the specified mob.
|
boolean |
canWearArmor()
Return true if the horse entity can wear an armor
|
EntityAgeable |
createChild(EntityAgeable ageable) |
void |
dropChestItems() |
void |
dropChests() |
protected void |
entityInit() |
void |
fall(float distance,
float damageMultiplier) |
boolean |
func_110239_cn() |
boolean |
func_110253_bW() |
protected void |
func_142017_o(float p_142017_1_) |
boolean |
func_175507_cI() |
protected java.lang.String |
getAngrySoundName() |
boolean |
getCanSpawnHere()
Checks if the entity's current position is a valid location to spawn this entity.
|
protected EntityHorse |
getClosestHorse(Entity entityIn,
double distance) |
protected java.lang.String |
getDeathSound()
Returns the sound this mob makes on death.
|
protected Item |
getDropItem() |
float |
getEyeHeight() |
float |
getGrassEatingAmount(float p_110258_1_) |
boolean |
getHasReproduced() |
int |
getHorseArmorIndexSynced()
Returns type of armor from DataWatcher (0 = iron, 1 = gold, 2 = diamond)
|
double |
getHorseJumpStrength() |
float |
getHorseSize() |
java.lang.String |
getHorseTexture() |
int |
getHorseType()
Returns the horse type. 0 = Normal, 1 = Donkey, 2 = Mule, 3 = Undead Horse, 4 = Skeleton Horse
|
int |
getHorseVariant() |
protected java.lang.String |
getHurtSound()
Returns the sound this mob makes when it is hurt.
|
protected java.lang.String |
getLivingSound()
Returns the sound this mob makes while it's alive.
|
int |
getMaxSpawnedInChunk()
Will return how many at most can spawn in a chunk at once.
|
int |
getMaxTemper() |
float |
getMouthOpennessAngle(float p_110201_1_) |
java.lang.String |
getName()
Get the name of this object.
|
java.lang.String |
getOwnerId()
Gets the horse's owner
|
float |
getRearingAmount(float p_110223_1_) |
protected float |
getSoundVolume()
Returns the volume for the sounds this mob makes.
|
int |
getTalkInterval()
Get number of ticks, at least during which the living entity will be silent.
|
int |
getTemper() |
int |
getTotalArmorValue()
Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
|
java.lang.String[] |
getVariantTexturePaths() |
void |
handleStatusUpdate(byte id) |
int |
increaseTemper(int p_110198_1_) |
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.
|
boolean |
isAdultHorse() |
static boolean |
isArmorItem(Item p_146085_0_)
Returns true if given item is horse armor
|
boolean |
isBreeding() |
boolean |
isBreedingItem(ItemStack stack)
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)
|
boolean |
isChested() |
boolean |
isEatingHaystack() |
boolean |
isHorseJumping() |
boolean |
isHorseSaddled() |
protected boolean |
isMovementBlocked()
Dead and sleeping entities cannot move
|
boolean |
isOnLadder()
returns true if this entity is by a ladder, false otherwise
|
boolean |
isRearing() |
boolean |
isSterile()
Return true if the horse entity is sterile (Undead || Mule)
|
boolean |
isTame() |
boolean |
isUndead()
Used to know if the horse can be leashed, if he can mate, or if we can interact with him
|
void |
makeHorseRearWithSound() |
void |
moveEntityWithHeading(float strafe,
float forward)
Moves the entity based on the specified heading.
|
void |
onDeath(DamageSource cause)
Called when the mob's health reaches 0.
|
IEntityLivingData |
onInitialSpawn(DifficultyInstance difficulty,
IEntityLivingData livingdata)
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.
|
void |
onInventoryChanged(InventoryBasic p_76316_1_)
Called by InventoryBasic.onInventoryChanged() on a array that is never filled.
|
void |
onLivingUpdate()
Called frequently so the entity can update its state every tick as required.
|
void |
onUpdate()
Called to update the entity's position/logic.
|
void |
openGUI(EntityPlayer playerEntity) |
protected void |
playStepSound(BlockPos pos,
Block blockIn) |
boolean |
prepareChunkForSpawn() |
void |
readEntityFromNBT(NBTTagCompound tagCompund)
(abstract) Protected helper method to read subclass entity data from NBT.
|
boolean |
replaceItemInInventory(int inventorySlot,
ItemStack itemStackIn) |
void |
setBreeding(boolean breeding) |
void |
setChested(boolean chested) |
void |
setEating(boolean eating) |
void |
setEatingHaystack(boolean p_110227_1_) |
void |
setHasReproduced(boolean hasReproducedIn) |
void |
setHorseArmorStack(ItemStack itemStackIn)
Set horse armor stack (for example: new ItemStack(Items.iron_horse_armor))
|
void |
setHorseJumping(boolean jumping) |
void |
setHorseSaddled(boolean saddled) |
void |
setHorseTamed(boolean tamed) |
void |
setHorseType(int type) |
void |
setHorseVariant(int variant) |
void |
setJumpPower(int jumpPowerIn) |
void |
setOwnerId(java.lang.String id) |
void |
setRearing(boolean rearing) |
void |
setScaleForAge(boolean p_98054_1_)
"Sets the scale for an ageable entity according to the boolean parameter, which says if it's a child."
|
boolean |
setTamedBy(EntityPlayer player) |
void |
setTemper(int temperIn) |
protected void |
spawnHorseParticles(boolean p_110216_1_)
"Spawns particles for the horse entity. par1 tells whether to spawn hearts.
|
void |
updateRiderPosition() |
void |
writeEntityToNBT(NBTTagCompound tagCompound)
(abstract) Protected helper method to write subclass entity data to NBT.
|
canDespawn, consumeItemFromStack, getBlockPathWeight, getExperiencePoints, getPlayerInLove, isInLove, resetInLove, setInLove, updateAITasksaddGrowth, func_175501_a, getGrowingAge, isChild, onGrowingAdult, setGrowingAge, setScale, setSizedetachHome, getHomePosition, getMaximumHomeDistance, hasHome, hasPath, isWithinHomeDistanceCurrentPosition, isWithinHomeDistanceFromPosition, setHomePosAndDistance, updateLeashedStatecanAttackClass, canBeSteered, canPickUpLoot, clearLeashed, despawnEntity, dropEquipment, dropFewItems, eatGrassBonus, enablePersistence, faceEntity, func_110146_f, func_175448_a, getArmorItemForSlot, getArmorPosition, getAttackTarget, getCurrentArmor, getEntitySenses, getEquipmentInSlot, getHeldItem, getInventory, getJumpHelper, getLeashed, getLeashedToEntity, getLookHelper, getMaxFallHeight, getMoveHelper, getNavigator, getNewNavigator, getRenderSizeModifier, getVerticalFaceSpeed, interactFirst, isAIDisabled, isNoDespawnRequired, isNotColliding, isServerWorld, onEntityUpdate, playLivingSound, setAIMoveSpeed, setAttackTarget, setCanPickUpLoot, setCurrentItemOrArmor, setEnchantmentBasedOnDifficulty, setEquipmentBasedOnDifficulty, setEquipmentDropChance, setLeashedToEntity, setMoveForward, setNoAI, spawnExplosionParticle, updateEntityActionState, updateEquipmentIfNeededaddPotionEffect, addRandomDrop, applyArmorCalculations, applyPotionDamageCalculations, attackEntityAsMob, canBeCollidedWith, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, collideWithEntity, collideWithNearbyEntities, curePotionEffects, damageArmor, damageEntity, decreaseAirSupply, dismountEntity, func_181013_g, func_94060_bK, getAbsorptionAmount, getActivePotionEffect, getActivePotionEffects, getAge, getAIMoveSpeed, getAITarget, getAlwaysRenderNameTagForRender, getArrowCountInEntity, getAttributeMap, getCombatTracker, getCreatureAttribute, getEntityAttribute, getFallSoundString, getHealth, getJumpUpwardsMotion, getLastAttacker, getLastAttackerTime, getLook, getLookVec, getMaxHealth, getRevengeTimer, getRNG, getRotationYawHead, getSoundPitch, getSwingProgress, getTeam, handleJumpLava, heal, isEntityAlive, isEntityUndead, isOnSameTeam, isOnTeam, isPlayer, isPlayerSleeping, isPotionActive, isPotionActive, isPotionApplicable, jump, kill, knockBack, markPotionsDirty, mountEntity, onChangedPotionEffect, onDeathUpdate, onFinishedPotionEffect, onItemPickup, onKillCommand, onNewPotionEffect, performHurtAnimation, removePotionEffect, removePotionEffectClient, renderBrokenItemStack, resetPotionEffectMetadata, sendEndCombat, sendEnterCombat, setAbsorptionAmount, setArrowCountInEntity, setBeenAttacked, setHealth, setJumping, setLastAttacker, setPositionAndRotation2, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, swingItem, updateAITick, updateArmSwingProgress, updateFallState, updatePotionEffects, updatePotionMetadata, updateRiddenaddChatMessage, addEntityCrashInfo, addToPlayerScore, addVelocity, applyEnchantments, applyEntityCollision, canAttackWithItem, canCommandSenderUseCommand, canRenderOnFire, canRiderInteract, canTriggerWalking, clientUpdateEntityNBT, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, deserializeNBT, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, func_174817_o, func_181012_aH, func_181014_aG, getAir, getAlwaysRenderNameTag, getBrightness, getBrightnessForRender, getCapability, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCommandStats, getCustomNameTag, getDataWatcher, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getExplosionResistance, getExtendedProperties, getFlag, getHorizontalFacing, getHoverEvent, getMaxInPortalTime, getMountedYOffset, getNBTTagCompound, getParts, getPersistentID, getPickedResult, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getSplashSound, getSwimSound, getUniqueID, getVectorForRotation, getYOffset, handleWaterMovement, hasCapability, hasCustomName, hashCode, hitByEntity, interactAt, isBurning, isCreatureType, isEating, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isOutsideBorder, isPushedByWater, isRiding, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, moveEntity, moveFlying, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onDataWatcherUpdate, onKillEntity, onStruckByLightning, playSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, registerExtendedProperties, resetEntityId, resetHeight, sendCommandFeedback, serializeNBT, setAir, setAlwaysRenderNameTag, setAngles, setCommandStat, setCustomNameTag, setDead, setEntityBoundingBox, setEntityId, setFire, setFlag, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPortal, setPosition, setPositionAndRotation, setPositionAndUpdate, setRotation, setSilent, setSneaking, setVelocity, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, toString, travelToDimension, verifyExplosion, writeMountToNBT, writeToNBT, writeToNBTOptionalpublic int field_110278_bp
public int field_110279_bq
protected boolean horseJumping
protected int temper
protected float jumpPower
public EntityHorse(World worldIn)
protected void entityInit()
entityInit in class EntityAgeablepublic void setHorseType(int type)
public int getHorseType()
public void setHorseVariant(int variant)
public int getHorseVariant()
public java.lang.String getName()
getName in interface ICommandSendergetName in class Entitypublic boolean isAdultHorse()
public boolean isTame()
public boolean func_110253_bW()
public java.lang.String getOwnerId()
public void setOwnerId(java.lang.String id)
public float getHorseSize()
public void setScaleForAge(boolean p_98054_1_)
setScaleForAge in class EntityAgeablepublic boolean isHorseJumping()
public void setHorseTamed(boolean tamed)
public void setHorseJumping(boolean jumping)
public boolean allowLeashing()
allowLeashing in class EntityLivingprotected void func_142017_o(float p_142017_1_)
func_142017_o in class EntityCreaturepublic boolean isChested()
public int getHorseArmorIndexSynced()
public boolean isEatingHaystack()
public boolean isRearing()
public boolean isBreeding()
public boolean getHasReproduced()
public void setHorseArmorStack(ItemStack itemStackIn)
public void setBreeding(boolean breeding)
public void setChested(boolean chested)
public void setHasReproduced(boolean hasReproducedIn)
public void setHorseSaddled(boolean saddled)
public int getTemper()
public void setTemper(int temperIn)
public int increaseTemper(int p_110198_1_)
public boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom in class EntityAnimalpublic int getTotalArmorValue()
getTotalArmorValue in class EntityLivingBasepublic boolean canBePushed()
canBePushed in class EntityLivingBasepublic boolean prepareChunkForSpawn()
public void dropChests()
public void fall(float distance,
float damageMultiplier)
fall in class EntityLivingBasepublic void onInventoryChanged(InventoryBasic p_76316_1_)
onInventoryChanged in interface IInvBasicpublic boolean getCanSpawnHere()
getCanSpawnHere in class EntityAnimalprotected EntityHorse getClosestHorse(Entity entityIn, double distance)
public double getHorseJumpStrength()
protected java.lang.String getDeathSound()
getDeathSound in class EntityLivingBaseprotected Item getDropItem()
getDropItem in class EntityLivingprotected java.lang.String getHurtSound()
getHurtSound in class EntityLivingBasepublic boolean isHorseSaddled()
protected java.lang.String getLivingSound()
getLivingSound in class EntityLivingprotected java.lang.String getAngrySoundName()
protected void playStepSound(BlockPos pos, Block blockIn)
playStepSound in class Entityprotected void applyEntityAttributes()
applyEntityAttributes in class EntityLivingpublic int getMaxSpawnedInChunk()
getMaxSpawnedInChunk in class EntityLivingpublic int getMaxTemper()
protected float getSoundVolume()
getSoundVolume in class EntityLivingBasepublic int getTalkInterval()
getTalkInterval in class EntityAnimalpublic boolean func_110239_cn()
public boolean func_175507_cI()
public java.lang.String getHorseTexture()
public java.lang.String[] getVariantTexturePaths()
public void openGUI(EntityPlayer playerEntity)
public boolean interact(EntityPlayer player)
interact in class EntityAnimalpublic boolean canWearArmor()
public boolean canCarryChest()
protected boolean isMovementBlocked()
isMovementBlocked in class EntityLivingBasepublic boolean isUndead()
public boolean isSterile()
public boolean isBreedingItem(ItemStack stack)
isBreedingItem in class EntityAnimalpublic void onDeath(DamageSource cause)
onDeath in class EntityLivingBasepublic void onLivingUpdate()
onLivingUpdate in class EntityAnimalpublic void onUpdate()
onUpdate in class EntityLivingpublic void setEatingHaystack(boolean p_110227_1_)
public void setRearing(boolean rearing)
public void makeHorseRearWithSound()
public void dropChestItems()
public boolean setTamedBy(EntityPlayer player)
public void moveEntityWithHeading(float strafe,
float forward)
moveEntityWithHeading in class EntityLivingBasepublic void writeEntityToNBT(NBTTagCompound tagCompound)
writeEntityToNBT in class EntityAnimalpublic void readEntityFromNBT(NBTTagCompound tagCompund)
readEntityFromNBT in class EntityAnimalpublic boolean canMateWith(EntityAnimal otherAnimal)
canMateWith in class EntityAnimalpublic EntityAgeable createChild(EntityAgeable ageable)
createChild in class EntityAgeablepublic IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, IEntityLivingData livingdata)
onInitialSpawn in class EntityLivingpublic float getGrassEatingAmount(float p_110258_1_)
public float getRearingAmount(float p_110223_1_)
public float getMouthOpennessAngle(float p_110201_1_)
public void setJumpPower(int jumpPowerIn)
protected void spawnHorseParticles(boolean p_110216_1_)
public void handleStatusUpdate(byte id)
handleStatusUpdate in class EntityAnimalpublic void updateRiderPosition()
updateRiderPosition in class Entitypublic static boolean isArmorItem(Item p_146085_0_)
public boolean isOnLadder()
isOnLadder in class EntityLivingBasepublic float getEyeHeight()
getEyeHeight in class Entitypublic boolean replaceItemInInventory(int inventorySlot,
ItemStack itemStackIn)
replaceItemInInventory in class EntityLiving