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 |
spawnableBlock
forcedAge, forcedAgeTimer, growingAge
FLEEING_SPEED_MODIFIER, FLEEING_SPEED_MODIFIER_UUID
experienceValue, inventoryArmorDropChances, inventoryHandsDropChances, jumpHelper, livingSoundTime, moveHelper, navigator, targetTasks, tasks
activeItemStack, 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, unused180
addedToChunk, 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, updateAITasks
addGrowth, ageUp, getGrowingAge, isChild, notifyDataManagerChange, onGrowingAdult, setGrowingAge, setScale, setSize
detachHome, getHomePosition, getMaximumHomeDistance, hasHome, hasPath, isWithinHomeDistanceCurrentPosition, isWithinHomeDistanceFromPosition, setHomePosAndDistance, updateLeashedState
canAttackClass, 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, updateEquipmentIfNeeded
addPotionEffect, 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, updateRidden
addChatMessage, 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, writeToNBTOptional
public int tailCounter
public int sprintCounter
protected boolean horseJumping
protected int temper
protected float jumpPower
public EntityHorse(World worldIn)
protected void initEntityAI()
initEntityAI
in class EntityLiving
protected void entityInit()
entityInit
in class EntityAgeable
public void setType(HorseType armorType)
public HorseType getType()
public void setHorseVariant(int variant)
public int getHorseVariant()
public java.lang.String getName()
getName
in interface ICommandSender
getName
in class Entity
public 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 EntityAgeable
public boolean isHorseJumping()
public void setHorseTamed(boolean tamed)
public void setHorseJumping(boolean jumping)
public boolean canBeLeashedTo(EntityPlayer player)
canBeLeashedTo
in class EntityLiving
protected void onLeashDistance(float p_142017_1_)
onLeashDistance
in class EntityCreature
public 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 EntityAnimal
public boolean canBePushed()
canBePushed
in class EntityLivingBase
public boolean prepareChunkForSpawn()
public void dropChests()
public void fall(float distance, float damageMultiplier)
fall
in class EntityLivingBase
public void onInventoryChanged(InventoryBasic invBasic)
onInventoryChanged
in interface IInventoryChangedListener
public boolean getCanSpawnHere()
getCanSpawnHere
in class EntityAnimal
protected EntityHorse getClosestHorse(Entity entityIn, double distance)
public double getHorseJumpStrength()
protected SoundEvent getDeathSound()
getDeathSound
in class EntityLivingBase
protected SoundEvent getHurtSound()
getHurtSound
in class EntityLivingBase
public boolean isHorseSaddled()
protected SoundEvent getAmbientSound()
getAmbientSound
in class EntityLiving
@Nullable protected SoundEvent getAngrySound()
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 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 EntityAnimal
protected boolean isMovementBlocked()
isMovementBlocked
in class EntityLivingBase
public boolean isBreedingItem(@Nullable ItemStack stack)
isBreedingItem
in class EntityAnimal
public void onDeath(DamageSource cause)
onDeath
in class EntityLivingBase
public void onLivingUpdate()
onLivingUpdate
in class EntityAnimal
public void onUpdate()
onUpdate
in class EntityLiving
public 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 EntityLivingBase
public void writeEntityToNBT(NBTTagCompound compound)
writeEntityToNBT
in class EntityAnimal
public void readEntityFromNBT(NBTTagCompound compound)
readEntityFromNBT
in class EntityAnimal
public boolean canMateWith(EntityAnimal otherAnimal)
canMateWith
in class EntityAnimal
public EntityAgeable createChild(EntityAgeable ageable)
createChild
in class EntityAgeable
@Nullable public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingdata)
onInitialSpawn
in class EntityLiving
public boolean canBeSteered()
canBeSteered
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)
setJumpPower
in interface IJumpingMount
public boolean canJump()
canJump
in interface IJumpingMount
public void handleStartJump(int p_184775_1_)
handleStartJump
in interface IJumpingMount
public void handleStopJump()
handleStopJump
in interface IJumpingMount
protected void spawnHorseParticles(boolean p_110216_1_)
public void handleStatusUpdate(byte id)
handleStatusUpdate
in class EntityAnimal
public void updatePassenger(Entity passenger)
updatePassenger
in class Entity
public double getMountedYOffset()
getMountedYOffset
in class Entity
public boolean isSkeletonTrap()
public void setSkeletonTrap(boolean skeletonTrapIn)
public boolean isOnLadder()
isOnLadder
in class EntityLivingBase
public float getEyeHeight()
getEyeHeight
in class Entity
public boolean replaceItemInInventory(int inventorySlot, @Nullable ItemStack itemStackIn)
replaceItemInInventory
in class EntityLiving
@Nullable public Entity getControllingPassenger()
getControllingPassenger
in class Entity
public EnumCreatureAttribute getCreatureAttribute()
getCreatureAttribute
in class EntityLivingBase
@Nullable protected ResourceLocation getLootTable()
getLootTable
in class EntityLiving
public <T> T getCapability(Capability<T> capability, EnumFacing facing)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class EntityLivingBase
capability
- 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)
ICapabilityProvider
hasCapability
in interface ICapabilityProvider
hasCapability
in class EntityLivingBase
capability
- The capability to checkfacing
- The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'