public class EntityHorse extends EntityAnimal implements IInventoryChangedListener, IJumpingMount
| Modifier and Type | Class and Description |
|---|---|
static class |
EntityHorse.GroupData |
EntityLiving.SpawnPlacementType| Modifier and Type | Field and Description |
|---|---|
protected boolean |
horseJumping |
protected float |
jumpPower |
int |
sprintCounter |
int |
tailCounter |
protected int |
temper |
spawnableBlockforcedAge, forcedAgeTimer, growingAgeFLEEING_SPEED_MODIFIER, FLEEING_SPEED_MODIFIER_UUIDexperienceValue, inventoryArmorDropChances, inventoryHandsDropChances, jumpHelper, livingSoundTime, moveHelper, navigator, targetTasks, tasksactiveItemStack, activeItemStackUseCount, arrowHitTimer, attackedAtYaw, attackingPlayer, cameraPitch, dead, deathTime, entityAge, HAND_STATES, hurtTime, interpTargetPitch, interpTargetX, interpTargetY, interpTargetYaw, interpTargetZ, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, newPosRotationIncrements, onGroundSpeedFactor, prevCameraPitch, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomUnused1, randomUnused2, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, swingingHand, swingProgress, swingProgressInt, ticksElytraFlying, ticksSinceLastSwing, unused180addedToChunk, cachedUniqueIdString, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, fireResistance, firstUpdate, forceSpawn, glowing, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj| Constructor and Description |
|---|
EntityHorse(World worldIn) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyEntityAttributes() |
boolean |
attackEntityFrom(DamageSource source,
float amount) |
boolean |
canBeLeashedTo(EntityPlayer player) |
boolean |
canBePushed() |
boolean |
canBeSteered() |
boolean |
canJump() |
boolean |
canMateWith(EntityAnimal otherAnimal) |
EntityAgeable |
createChild(EntityAgeable ageable) |
void |
dropChestItems() |
void |
dropChests() |
protected void |
entityInit() |
void |
fall(float distance,
float damageMultiplier) |
protected SoundEvent |
getAmbientSound() |
protected SoundEvent |
getAngrySound() |
boolean |
getCanSpawnHere() |
<T> T |
getCapability(Capability<T> capability,
EnumFacing facing)
Retrieves the handler for the capability requested on the specific side.
|
protected EntityHorse |
getClosestHorse(Entity entityIn,
double distance) |
Entity |
getControllingPassenger() |
EnumCreatureAttribute |
getCreatureAttribute() |
protected SoundEvent |
getDeathSound() |
float |
getEyeHeight() |
float |
getGrassEatingAmount(float p_110258_1_) |
boolean |
getHasReproduced() |
HorseArmorType |
getHorseArmorType() |
double |
getHorseJumpStrength() |
float |
getHorseSize() |
java.lang.String |
getHorseTexture() |
int |
getHorseVariant() |
protected SoundEvent |
getHurtSound() |
protected ResourceLocation |
getLootTable() |
int |
getMaxSpawnedInChunk() |
int |
getMaxTemper() |
double |
getMountedYOffset() |
float |
getMouthOpennessAngle(float p_110201_1_) |
java.lang.String |
getName() |
java.util.UUID |
getOwnerUniqueId() |
float |
getRearingAmount(float p_110223_1_) |
protected float |
getSoundVolume() |
int |
getTalkInterval() |
int |
getTemper() |
HorseType |
getType() |
java.lang.String[] |
getVariantTexturePaths() |
void |
handleStartJump(int p_184775_1_) |
void |
handleStatusUpdate(byte id) |
void |
handleStopJump() |
boolean |
hasCapability(Capability<?> capability,
EnumFacing facing)
Determines if this object has support for the capability in question on the specific side.
|
boolean |
hasLayeredTextures() |
boolean |
hasTexture() |
int |
increaseTemper(int p_110198_1_) |
protected void |
initEntityAI() |
boolean |
isAdultHorse() |
boolean |
isBreeding() |
boolean |
isBreedingItem(ItemStack stack) |
boolean |
isChested() |
boolean |
isEatingHaystack() |
boolean |
isHorseJumping() |
boolean |
isHorseSaddled() |
protected boolean |
isMovementBlocked() |
boolean |
isOnLadder() |
boolean |
isRearing() |
boolean |
isRidable() |
boolean |
isSkeletonTrap() |
boolean |
isTame() |
void |
makeHorseRearWithSound() |
void |
moveEntityWithHeading(float strafe,
float forward) |
void |
onDeath(DamageSource cause) |
IEntityLivingData |
onInitialSpawn(DifficultyInstance difficulty,
IEntityLivingData livingdata) |
void |
onInventoryChanged(InventoryBasic invBasic) |
protected void |
onLeashDistance(float p_142017_1_) |
void |
onLivingUpdate() |
void |
onUpdate() |
void |
openGUI(EntityPlayer playerEntity) |
protected void |
playStepSound(BlockPos pos,
Block blockIn) |
boolean |
prepareChunkForSpawn() |
boolean |
processInteract(EntityPlayer player,
EnumHand hand,
ItemStack stack) |
void |
readEntityFromNBT(NBTTagCompound compound) |
boolean |
replaceItemInInventory(int inventorySlot,
ItemStack itemStackIn) |
void |
setBreeding(boolean breeding) |
void |
setChested(boolean chested) |
void |
setEatingHaystack(boolean p_110227_1_) |
void |
setHasReproduced(boolean hasReproducedIn) |
void |
setHorseArmorStack(ItemStack itemStackIn) |
void |
setHorseJumping(boolean jumping) |
void |
setHorseSaddled(boolean saddled) |
void |
setHorseTamed(boolean tamed) |
void |
setHorseVariant(int variant) |
void |
setJumpPower(int jumpPowerIn) |
void |
setOwnerUniqueId(java.util.UUID uniqueId) |
void |
setRearing(boolean rearing) |
void |
setScaleForAge(boolean child) |
void |
setSkeletonTrap(boolean skeletonTrapIn) |
boolean |
setTamedBy(EntityPlayer player) |
void |
setTemper(int temperIn) |
void |
setType(HorseType armorType) |
protected void |
spawnHorseParticles(boolean p_110216_1_) |
void |
updatePassenger(Entity passenger) |
void |
writeEntityToNBT(NBTTagCompound compound) |
canDespawn, consumeItemFromStack, getBlockPathWeight, getExperiencePoints, getPlayerInLove, getYOffset, isInLove, resetInLove, setInLove, updateAITasksaddGrowth, ageUp, getGrowingAge, isChild, notifyDataManagerChange, onGrowingAdult, setGrowingAge, setScale, setSizedetachHome, getHomePosition, getMaximumHomeDistance, hasHome, hasPath, isWithinHomeDistanceCurrentPosition, isWithinHomeDistanceFromPosition, setHomePosAndDistance, updateLeashedStatecanAttackClass, canEquipItem, canPickUpLoot, clearLeashed, createBodyHelper, despawnEntity, dropEquipment, dropFewItems, dropLoot, eatGrassBonus, enablePersistence, faceEntity, getArmorByChance, getArmorInventoryList, getAttackTarget, getDropItem, getEntitySenses, getHeldEquipment, getHorizontalFaceSpeed, getItemStackFromSlot, getJumpHelper, getLeashed, getLeashedToEntity, getLookHelper, getMaxFallHeight, getMoveHelper, getNavigator, getNewNavigator, getPathPriority, getPrimaryHand, getRenderSizeModifier, getSlotForItemStack, getVerticalFaceSpeed, isAIDisabled, isItemStackInSlot, isLeftHanded, isNoDespawnRequired, isNotColliding, isServerWorld, onEntityUpdate, playHurtSound, playLivingSound, processInitialInteract, setAIMoveSpeed, setAttackTarget, setCanPickUpLoot, setDropChance, setEnchantmentBasedOnDifficulty, setEquipmentBasedOnDifficulty, setItemStackToSlot, setLeashedToEntity, setLeftHanded, setMoveForward, setMoveStrafing, setNoAI, setPathPriority, spawnExplosionParticle, startRiding, updateDistance, updateEntityActionState, updateEquipmentIfNeededaddPotionEffect, applyArmorCalculations, applyPotionDamageCalculations, areAllPotionsAmbient, attackEntityAsMob, attemptTeleport, canBeCollidedWith, canBeHitWithPotion, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, collideWithEntity, collideWithNearbyEntities, curePotionEffects, damageArmor, damageEntity, damageShield, decreaseAirSupply, dismountEntity, dismountRidingEntity, frostWalk, getAbsorptionAmount, getActiveHand, getActiveItemStack, getActivePotionEffect, getActivePotionEffects, getAge, getAIMoveSpeed, getAITarget, getAlwaysRenderNameTagForRender, getArrowCountInEntity, getAttackingEntity, getAttributeMap, getCombatTracker, getEntityAttribute, getFallSound, getHealth, getHeldItem, getHeldItemMainhand, getHeldItemOffhand, getItemInUseCount, getItemInUseMaxCount, getJumpUpwardsMotion, getLastAttacker, getLastAttackerTime, getLook, getLookVec, getMaxHealth, getRevengeTimer, getRNG, getRotationYawHead, getSoundPitch, getSwingProgress, getTicksElytraFlying, getTotalArmorValue, handleJumpLava, handleJumpWater, heal, isActiveItemStackBlocking, isElytraFlying, isEntityAlive, isEntityUndead, isHandActive, isPlayer, isPlayerSleeping, isPotionActive, isPotionApplicable, jump, kill, knockBack, markPotionsDirty, onChangedPotionEffect, onDeathUpdate, onFinishedPotionEffect, onItemPickup, onItemUseFinish, onKillCommand, onNewPotionEffect, performHurtAnimation, playEquipSound, removeActivePotionEffect, removePotionEffect, renderBrokenItemStack, resetActiveHand, resetPotionEffectMetadata, sendEndCombat, sendEnterCombat, setAbsorptionAmount, setActiveHand, setArrowCountInEntity, setBeenAttacked, setHealth, setHeldItem, setJumping, setLastAttacker, setPositionAndRotationDirect, setRenderYawOffset, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, stopActiveHand, swingArm, updateActiveHand, updateArmSwingProgress, updateFallState, updateItemUse, updatePotionEffects, updatePotionMetadata, updateRiddenaddChatMessage, addEntityCrashInfo, addPassenger, addTag, addToPlayerScore, addTrackingPlayer, addVelocity, applyEnchantments, applyEntityCollision, applyOrientationToEntity, applyPlayerInteraction, canBeAttackedWithItem, canBeRidden, canCommandSenderUseCommand, canFitPassenger, canPassengerSteer, canRenderOnFire, canRiderInteract, canTriggerWalking, changeDimension, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, deserializeNBT, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, getAdjustedHorizontalFacing, getAir, getAlwaysRenderNameTag, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCommandStats, getCustomNameTag, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getFlag, getHorizontalFacing, getHoverEvent, getLastPortalVec, getLowestRidingEntity, getMaxInPortalTime, getMirroredYaw, getParts, getPassengers, getPersistentID, getPickedResult, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getPushReaction, getRecursivePassengers, getRecursivePassengersByType, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getServer, getSoundCategory, getSplashSound, getSwimSound, getTags, getTeam, getTeleportDirection, getUniqueID, getVectorForRotation, handleWaterMovement, hasCustomName, hashCode, hitByEntity, ignoreItemEntityData, isBeingRidden, isBurning, isCreatureType, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isNonBoss, isOffsetPositionInLiquid, isOnSameTeam, isOnScoreboardTeam, isOutsideBorder, isPassenger, isPushedByWater, isRiding, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, moveEntity, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onKillEntity, onStruckByLightning, playSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, removePassenger, removePassengers, removeTag, removeTrackingPlayer, resetEntityId, resetHeight, resetPositionToBB, sendCommandFeedback, serializeNBT, setAir, setAlwaysRenderNameTag, setAngles, setCommandStat, setCommandStats, setCustomNameTag, setDead, setDropItemsWhenDead, setEntityBoundingBox, setEntityId, setEntityInvulnerable, setFire, setFlag, setGlowing, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPortal, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRotation, setSilent, setSneaking, setUniqueId, setVelocity, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, toString, verifyExplosion, writeToNBT, writeToNBTAtomically, writeToNBTOptionalpublic int tailCounter
public int sprintCounter
protected boolean horseJumping
protected int temper
protected float jumpPower
public EntityHorse(World worldIn)
protected void initEntityAI()
initEntityAI in class EntityLivingprotected void entityInit()
entityInit in class EntityAgeablepublic void setType(HorseType armorType)
public HorseType getType()
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 isRidable()
@Nullable public java.util.UUID getOwnerUniqueId()
public void setOwnerUniqueId(@Nullable
java.util.UUID uniqueId)
public float getHorseSize()
public void setScaleForAge(boolean child)
setScaleForAge in class EntityAgeablepublic boolean isHorseJumping()
public void setHorseTamed(boolean tamed)
public void setHorseJumping(boolean jumping)
public boolean canBeLeashedTo(EntityPlayer player)
canBeLeashedTo in class EntityLivingprotected void onLeashDistance(float p_142017_1_)
onLeashDistance in class EntityCreaturepublic boolean isChested()
public HorseArmorType getHorseArmorType()
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 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 invBasic)
onInventoryChanged in interface IInventoryChangedListenerpublic boolean getCanSpawnHere()
getCanSpawnHere in class EntityAnimalprotected EntityHorse getClosestHorse(Entity entityIn, double distance)
public double getHorseJumpStrength()
protected SoundEvent getDeathSound()
getDeathSound in class EntityLivingBaseprotected SoundEvent getHurtSound()
getHurtSound in class EntityLivingBasepublic boolean isHorseSaddled()
protected SoundEvent getAmbientSound()
getAmbientSound in class EntityLiving@Nullable protected SoundEvent getAngrySound()
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 hasLayeredTextures()
public boolean hasTexture()
public java.lang.String getHorseTexture()
public java.lang.String[] getVariantTexturePaths()
public void openGUI(EntityPlayer playerEntity)
public boolean processInteract(EntityPlayer player, EnumHand hand, @Nullable ItemStack stack)
processInteract in class EntityAnimalprotected boolean isMovementBlocked()
isMovementBlocked in class EntityLivingBasepublic boolean isBreedingItem(@Nullable
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 compound)
writeEntityToNBT in class EntityAnimalpublic void readEntityFromNBT(NBTTagCompound compound)
readEntityFromNBT in class EntityAnimalpublic boolean canMateWith(EntityAnimal otherAnimal)
canMateWith in class EntityAnimalpublic EntityAgeable createChild(EntityAgeable ageable)
createChild in class EntityAgeable@Nullable public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingdata)
onInitialSpawn in class EntityLivingpublic boolean canBeSteered()
canBeSteered 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)
setJumpPower in interface IJumpingMountpublic boolean canJump()
canJump in interface IJumpingMountpublic void handleStartJump(int p_184775_1_)
handleStartJump in interface IJumpingMountpublic void handleStopJump()
handleStopJump in interface IJumpingMountprotected void spawnHorseParticles(boolean p_110216_1_)
public void handleStatusUpdate(byte id)
handleStatusUpdate in class EntityAnimalpublic void updatePassenger(Entity passenger)
updatePassenger in class Entitypublic double getMountedYOffset()
getMountedYOffset in class Entitypublic boolean isSkeletonTrap()
public void setSkeletonTrap(boolean skeletonTrapIn)
public boolean isOnLadder()
isOnLadder in class EntityLivingBasepublic float getEyeHeight()
getEyeHeight in class Entitypublic boolean replaceItemInInventory(int inventorySlot,
@Nullable
ItemStack itemStackIn)
replaceItemInInventory in class EntityLiving@Nullable public Entity getControllingPassenger()
getControllingPassenger in class Entitypublic EnumCreatureAttribute getCreatureAttribute()
getCreatureAttribute in class EntityLivingBase@Nullable protected ResourceLocation getLootTable()
getLootTable in class EntityLivingpublic <T> T getCapability(Capability<T> capability, EnumFacing facing)
ICapabilityProvidergetCapability in interface ICapabilityProvidergetCapability in class EntityLivingBasecapability - The capability to checkfacing - The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'public boolean hasCapability(Capability<?> capability, EnumFacing facing)
ICapabilityProviderhasCapability in interface ICapabilityProviderhasCapability in class EntityLivingBasecapability - The capability to checkfacing - The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'