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 |
---|---|
private static int[] |
armorValues |
private int |
eatingHaystackCounter |
int |
field_110278_bp |
int |
field_110279_bq |
private boolean |
field_110294_bI |
private boolean |
field_175508_bO |
private int |
gallopTime
Used to determine the sound that the horse should make when it steps
|
private boolean |
hasReproduced |
private float |
headLean |
private static java.lang.String[] |
HORSE_ARMOR_TEXTURES_ABBR |
private static java.lang.String[] |
HORSE_MARKING_TEXTURES_ABBR |
private static java.lang.String[] |
HORSE_TEXTURES_ABBR |
private static java.lang.String[] |
horseArmorTextures |
private static com.google.common.base.Predicate<Entity> |
horseBreedingSelector |
private AnimalChest |
horseChest |
protected boolean |
horseJumping |
private static IAttribute |
horseJumpStrength |
private static java.lang.String[] |
horseMarkingTextures |
private static java.lang.String[] |
horseTextures |
private java.lang.String[] |
horseTexturesArray |
protected float |
jumpPower |
private int |
jumpRearingCounter |
private float |
mouthOpenness |
private int |
openMouthCounter |
private float |
prevHeadLean |
private float |
prevMouthOpenness |
private float |
prevRearingAmount |
private float |
rearingAmount |
protected int |
temper
"The higher this value, the more likely the horse is to be tamed next time a player rides it."
|
private java.lang.String |
texturePrefix |
spawnableBlock
field_175502_b, field_175503_c, growingAge
FLEEING_SPEED_MODIFIER, FLEEING_SPEED_MODIFIER_UUID
equipmentDropChances, experienceValue, jumpHelper, livingSoundTime, moveHelper, navigator, targetTasks, tasks
arrowHitTimer, 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, swingProgressInt
addedToChunk, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, 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.
|
private boolean |
canMate()
Return true if the horse entity ready to mate.
|
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() |
private void |
dropItemsInChest(Entity entityIn,
AnimalChest animalChestIn) |
protected void |
entityInit() |
void |
fall(float distance,
float damageMultiplier) |
private void |
func_110210_cH() |
boolean |
func_110239_cn() |
boolean |
func_110253_bW() |
private void |
func_110266_cB() |
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.
|
private int |
getChestSize()
Returns number of slots depending horse type
|
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() |
private int |
getHorseArmorIndex(ItemStack itemStackIn)
0 = iron, 1 = gold, 2 = diamond
|
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.
|
int |
getHorseVariant() |
private boolean |
getHorseWatchableBoolean(int p_110233_1_) |
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() |
private double |
getModifiedJumpStrength()
Returns randomized jump strength
|
private float |
getModifiedMaxHealth()
Returns randomized max health
|
private double |
getModifiedMovementSpeed()
Returns randomized movement speed
|
float |
getMouthOpennessAngle(float p_110201_1_) |
java.lang.String |
getName()
Gets the name of this command sender (usually username, but possibly "Rcon")
|
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_) |
private void |
initHorseChest() |
boolean |
interact(EntityPlayer player)
Called when a player interacts with a mob.
|
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
|
private void |
makeHorseRear() |
void |
makeHorseRearWithSound() |
private void |
mountTo(EntityPlayer player) |
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) |
private void |
openHorseMouth() |
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) |
private void |
resetTexturePrefix() |
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) |
private void |
setHorseTexturePaths() |
void |
setHorseType(int type) |
void |
setHorseVariant(int variant) |
private void |
setHorseWatchableBoolean(int p_110208_1_,
boolean p_110208_2_) |
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.
|
private void |
updateHorseSlots()
Updates the items in the saddle and armor slots of the horse's inventory.
|
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, updateAITasks
addGrowth, func_175501_a, getGrowingAge, isChild, onGrowingAdult, setGrowingAge, setScale, setSize
detachHome, getHomePosition, getMaximumHomeDistance, hasHome, hasPath, isWithinHomeDistanceCurrentPosition, isWithinHomeDistanceFromPosition, setHomePosAndDistance, updateLeashedState
canAttackClass, 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, updateEquipmentIfNeeded
addPotionEffect, addRandomDrop, applyArmorCalculations, applyPotionDamageCalculations, attackEntityAsMob, canBeCollidedWith, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, collideWithEntity, collideWithNearbyEntities, 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, swingItem, updateAITick, updateArmSwingProgress, updateFallState, updatePotionEffects, updatePotionMetadata, updateRidden
addChatMessage, addEntityCrashInfo, addToPlayerScore, addVelocity, applyEnchantments, applyEntityCollision, canAttackWithItem, canCommandSenderUseCommand, canRenderOnFire, canTriggerWalking, clientUpdateEntityNBT, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, func_174817_o, func_181012_aH, func_181014_aG, func_181015_d, getAir, getAlwaysRenderNameTag, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCommandStats, getCustomNameTag, getDataWatcher, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityId, getEntityString, getEntityWorld, getExplosionResistance, getFlag, getHorizontalFacing, getHoverEvent, getMaxInPortalTime, getMountedYOffset, getNBTTagCompound, getParts, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getSplashSound, getSwimSound, getUniqueID, getVectorForRotation, getYOffset, handleWaterMovement, hasCustomName, hashCode, hitByEntity, interactAt, isBurning, 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, resetHeight, sendCommandFeedback, setAir, setAlwaysRenderNameTag, setAngles, setCommandStat, setCustomNameTag, setDead, setEntityBoundingBox, setEntityId, setFire, setFlag, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPosition, setPositionAndRotation, setPositionAndUpdate, setRotation, setSilent, setSneaking, setVelocity, setWorld, shouldSetPosAfterLoading, spawnRunningParticles, toString, travelToDimension, verifyExplosion, writeMountToNBT, writeToNBT, writeToNBTOptional
private static final com.google.common.base.Predicate<Entity> horseBreedingSelector
private static final IAttribute horseJumpStrength
private static final java.lang.String[] horseArmorTextures
private static final java.lang.String[] HORSE_ARMOR_TEXTURES_ABBR
private static final int[] armorValues
private static final java.lang.String[] horseTextures
private static final java.lang.String[] HORSE_TEXTURES_ABBR
private static final java.lang.String[] horseMarkingTextures
private static final java.lang.String[] HORSE_MARKING_TEXTURES_ABBR
private int eatingHaystackCounter
private int openMouthCounter
private int jumpRearingCounter
public int field_110278_bp
public int field_110279_bq
protected boolean horseJumping
private AnimalChest horseChest
private boolean hasReproduced
protected int temper
protected float jumpPower
private boolean field_110294_bI
private float headLean
private float prevHeadLean
private float rearingAmount
private float prevRearingAmount
private float mouthOpenness
private float prevMouthOpenness
private int gallopTime
private java.lang.String texturePrefix
private java.lang.String[] horseTexturesArray
private boolean field_175508_bO
public EntityHorse(World worldIn)
protected void entityInit()
entityInit
in class EntityAgeable
public void setHorseType(int type)
public int getHorseType()
public void setHorseVariant(int variant)
public int getHorseVariant()
public java.lang.String getName()
getName
in interface ICommandSender
getName
in class Entity
private boolean getHorseWatchableBoolean(int p_110233_1_)
private void setHorseWatchableBoolean(int p_110208_1_, boolean p_110208_2_)
public 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 EntityAgeable
public boolean isHorseJumping()
public void setHorseTamed(boolean tamed)
public void setHorseJumping(boolean jumping)
public boolean allowLeashing()
allowLeashing
in class EntityLiving
protected void func_142017_o(float p_142017_1_)
func_142017_o
in class EntityCreature
public boolean isChested()
public int getHorseArmorIndexSynced()
private int getHorseArmorIndex(ItemStack itemStackIn)
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 EntityAnimal
public int getTotalArmorValue()
getTotalArmorValue
in class EntityLivingBase
public boolean canBePushed()
canBePushed
in class EntityLivingBase
public boolean prepareChunkForSpawn()
public void dropChests()
private void func_110266_cB()
public void fall(float distance, float damageMultiplier)
fall
in class EntityLivingBase
private int getChestSize()
private void initHorseChest()
private void updateHorseSlots()
public void onInventoryChanged(InventoryBasic p_76316_1_)
onInventoryChanged
in interface IInvBasic
public boolean getCanSpawnHere()
getCanSpawnHere
in class EntityAnimal
protected EntityHorse getClosestHorse(Entity entityIn, double distance)
public double getHorseJumpStrength()
protected java.lang.String getDeathSound()
getDeathSound
in class EntityLivingBase
protected Item getDropItem()
getDropItem
in class EntityLiving
protected java.lang.String getHurtSound()
getHurtSound
in class EntityLivingBase
public boolean isHorseSaddled()
protected java.lang.String getLivingSound()
getLivingSound
in class EntityLiving
protected java.lang.String getAngrySoundName()
protected void playStepSound(BlockPos pos, Block blockIn)
playStepSound
in class Entity
protected void applyEntityAttributes()
applyEntityAttributes
in class EntityLiving
public int getMaxSpawnedInChunk()
getMaxSpawnedInChunk
in class EntityLiving
public int getMaxTemper()
protected float getSoundVolume()
getSoundVolume
in class EntityLivingBase
public int getTalkInterval()
getTalkInterval
in class EntityAnimal
public boolean func_110239_cn()
private void resetTexturePrefix()
public boolean func_175507_cI()
private void setHorseTexturePaths()
public java.lang.String getHorseTexture()
public java.lang.String[] getVariantTexturePaths()
public void openGUI(EntityPlayer playerEntity)
public boolean interact(EntityPlayer player)
interact
in class EntityAnimal
private void mountTo(EntityPlayer player)
public boolean canWearArmor()
public boolean canCarryChest()
protected boolean isMovementBlocked()
isMovementBlocked
in class EntityLivingBase
public boolean isUndead()
public boolean isSterile()
public boolean isBreedingItem(ItemStack stack)
isBreedingItem
in class EntityAnimal
private void func_110210_cH()
public void onDeath(DamageSource cause)
onDeath
in class EntityLivingBase
public void onLivingUpdate()
onLivingUpdate
in class EntityAnimal
public void onUpdate()
onUpdate
in class EntityLiving
private void openHorseMouth()
private boolean canMate()
public void setEatingHaystack(boolean p_110227_1_)
public void setRearing(boolean rearing)
private void makeHorseRear()
public void makeHorseRearWithSound()
public void dropChestItems()
private void dropItemsInChest(Entity entityIn, AnimalChest animalChestIn)
public boolean setTamedBy(EntityPlayer player)
public void moveEntityWithHeading(float strafe, float forward)
moveEntityWithHeading
in class EntityLivingBase
public void writeEntityToNBT(NBTTagCompound tagCompound)
writeEntityToNBT
in class EntityAnimal
public void readEntityFromNBT(NBTTagCompound tagCompund)
readEntityFromNBT
in class EntityAnimal
public boolean canMateWith(EntityAnimal otherAnimal)
canMateWith
in class EntityAnimal
public EntityAgeable createChild(EntityAgeable ageable)
createChild
in class EntityAgeable
public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, IEntityLivingData livingdata)
onInitialSpawn
in class EntityLiving
public 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 EntityAnimal
public void updateRiderPosition()
updateRiderPosition
in class Entity
private float getModifiedMaxHealth()
private double getModifiedJumpStrength()
private double getModifiedMovementSpeed()
public static boolean isArmorItem(Item p_146085_0_)
public boolean isOnLadder()
isOnLadder
in class EntityLivingBase
public float getEyeHeight()
getEyeHeight
in class Entity
public boolean replaceItemInInventory(int inventorySlot, ItemStack itemStackIn)
replaceItemInInventory
in class EntityLiving