public abstract class AbstractHorse extends EntityAnimal implements IInventoryChangedListener, IJumpingMount
EntityLiving.SpawnPlacementType| Modifier and Type | Field and Description |
|---|---|
private boolean |
allowStandSliding |
protected boolean |
canGallop |
private int |
eatingCounter |
protected int |
gallopTime |
private float |
headLean |
protected ContainerHorseChest |
horseChest |
protected boolean |
horseJumping |
private static com.google.common.base.Predicate<Entity> |
IS_HORSE_BREEDING |
private IItemHandler |
itemHandler |
protected static IAttribute |
JUMP_STRENGTH |
protected float |
jumpPower |
private int |
jumpRearingCounter |
private float |
mouthOpenness |
private int |
openMouthCounter |
private static DataParameter<com.google.common.base.Optional<java.util.UUID>> |
OWNER_UNIQUE_ID |
private float |
prevHeadLean |
private float |
prevMouthOpenness |
private float |
prevRearingAmount |
private float |
rearingAmount |
int |
sprintCounter |
private static DataParameter<java.lang.Byte> |
STATUS |
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, HAND_STATES, hurtTime, idleTime, interpTargetPitch, interpTargetX, interpTargetY, interpTargetYaw, interpTargetZ, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, moveVertical, newPosRotationIncrements, onGroundSpeedFactor, prevCameraPitch, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomUnused1, randomUnused2, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, SWIM_SPEED, swingingHand, swingProgress, swingProgressInt, ticksElytraFlying, ticksSinceLastSwing, unused180addedToChunk, cachedUniqueIdString, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, collided, collidedHorizontally, collidedVertically, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, 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, updateBlocked, velocityChanged, width, world| Constructor and Description |
|---|
AbstractHorse(World worldIn) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyEntityAttributes() |
boolean |
attackEntityFrom(DamageSource source,
float amount) |
boolean |
canBeLeashedTo(EntityPlayer player) |
boolean |
canBePushed() |
boolean |
canBeSaddled() |
boolean |
canBeSteered() |
boolean |
canEatGrass() |
boolean |
canJump() |
protected boolean |
canMate() |
boolean |
canMateWith(EntityAnimal otherAnimal) |
EntityAgeable |
createChild(EntityAgeable ageable) |
private void |
eatingHorse() |
protected void |
entityInit() |
void |
fall(float distance,
float damageMultiplier) |
protected void |
followMother() |
protected SoundEvent |
getAmbientSound() |
protected SoundEvent |
getAngrySound() |
<T> T |
getCapability(Capability<T> capability,
EnumFacing facing)
Retrieves the handler for the capability requested on the specific side.
|
protected AbstractHorse |
getClosestHorse(Entity entityIn,
double distance) |
Entity |
getControllingPassenger() |
protected SoundEvent |
getDeathSound() |
float |
getEyeHeight() |
float |
getGrassEatingAmount(float p_110258_1_) |
double |
getHorseJumpStrength() |
float |
getHorseSize() |
protected boolean |
getHorseWatchableBoolean(int p_110233_1_) |
protected SoundEvent |
getHurtSound(DamageSource damageSourceIn) |
protected int |
getInventorySize() |
int |
getMaxSpawnedInChunk() |
int |
getMaxTemper() |
protected double |
getModifiedJumpStrength() |
protected float |
getModifiedMaxHealth() |
protected double |
getModifiedMovementSpeed() |
float |
getMouthOpennessAngle(float p_110201_1_) |
java.util.UUID |
getOwnerUniqueId() |
float |
getRearingAmount(float p_110223_1_) |
protected float |
getSoundVolume() |
int |
getTalkInterval() |
int |
getTemper() |
protected boolean |
handleEating(EntityPlayer player,
ItemStack stack) |
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.
|
int |
increaseTemper(int p_110198_1_) |
protected void |
initEntityAI() |
protected void |
initHorseChest() |
boolean |
isArmor(ItemStack stack) |
boolean |
isBreeding() |
boolean |
isBreedingItem(ItemStack stack) |
boolean |
isEatingHaystack() |
boolean |
isHorseJumping() |
boolean |
isHorseSaddled() |
protected boolean |
isMovementBlocked() |
boolean |
isOnLadder() |
boolean |
isRearing() |
boolean |
isTame() |
private void |
makeHorseRear() |
void |
makeMad() |
protected void |
mountTo(EntityPlayer player) |
private void |
moveTail() |
void |
onDeath(DamageSource cause) |
IEntityLivingData |
onInitialSpawn(DifficultyInstance difficulty,
IEntityLivingData livingdata) |
void |
onInventoryChanged(IInventory invBasic) |
protected void |
onLeashDistance(float p_142017_1_) |
void |
onLivingUpdate() |
void |
onUpdate() |
void |
openGUI(EntityPlayer playerEntity) |
private void |
openHorseMouth() |
protected void |
playGallopSound(SoundType p_190680_1_) |
protected void |
playStepSound(BlockPos pos,
Block blockIn) |
void |
readEntityFromNBT(NBTTagCompound compound) |
static void |
registerFixesAbstractHorse(DataFixer fixer,
java.lang.Class<?> entityClass) |
boolean |
replaceItemInInventory(int inventorySlot,
ItemStack itemStackIn) |
void |
setBreeding(boolean breeding) |
void |
setEatingHaystack(boolean p_110227_1_) |
void |
setHorseJumping(boolean jumping) |
void |
setHorseSaddled(boolean saddled) |
void |
setHorseTamed(boolean tamed) |
protected void |
setHorseWatchableBoolean(int p_110208_1_,
boolean p_110208_2_) |
void |
setJumpPower(int jumpPowerIn) |
protected void |
setOffspringAttributes(EntityAgeable p_190681_1_,
AbstractHorse p_190681_2_) |
void |
setOwnerUniqueId(java.util.UUID uniqueId) |
void |
setRearing(boolean rearing) |
void |
setScaleForAge(boolean child) |
boolean |
setTamedBy(EntityPlayer player) |
void |
setTemper(int temperIn) |
protected void |
spawnHorseParticles(boolean p_110216_1_) |
void |
travel(float strafe,
float vertical,
float forward) |
protected void |
updateHorseSlots() |
void |
updatePassenger(Entity passenger) |
boolean |
wearsArmor() |
void |
writeEntityToNBT(NBTTagCompound compound) |
canDespawn, consumeItemFromStack, getBlockPathWeight, getCanSpawnHere, getExperiencePoints, getLoveCause, getYOffset, isInLove, processInteract, resetInLove, setInLove, updateAITasksaddGrowth, ageUp, getGrowingAge, holdingSpawnEggOfClass, isChild, notifyDataManagerChange, onGrowingAdult, setGrowingAge, setScale, setSizedetachHome, followLeashSpeed, getHomePosition, getMaximumHomeDistance, hasHome, hasPath, isWithinHomeDistanceCurrentPosition, isWithinHomeDistanceFromPosition, setHomePosAndDistance, updateLeashedStatecanAttackClass, canEquipItem, canPassengerSteer, canPickUpLoot, clearLeashed, createBodyHelper, createNavigator, despawnEntity, dropEquipment, dropFewItems, dropLoot, eatGrassBonus, enablePersistence, faceEntity, getArmorByChance, getArmorInventoryList, getAttackTarget, getDropItem, getEntitySenses, getHeldEquipment, getHorizontalFaceSpeed, getItemStackFromSlot, getJumpHelper, getLeashed, getLeashHolder, getLookHelper, getLootTable, getMaxFallHeight, getMoveHelper, getNavigator, getPathPriority, getPrimaryHand, getRenderSizeModifier, getSlotForItemStack, getVerticalFaceSpeed, isAIDisabled, isItemStackInSlot, isLeftHanded, isNoDespawnRequired, isNotColliding, isServerWorld, onEntityUpdate, playHurtSound, playLivingSound, processInitialInteract, registerFixesMob, setAIMoveSpeed, setAttackTarget, setCanPickUpLoot, setDropChance, setEnchantmentBasedOnDifficulty, setEquipmentBasedOnDifficulty, setItemStackToSlot, setLeashHolder, setLeftHanded, setMoveForward, setMoveStrafing, setMoveVertical, setNoAI, setPathPriority, spawnExplosionParticle, startRiding, updateDistance, updateEntityActionState, updateEquipmentIfNeededaddPotionEffect, applyArmorCalculations, applyPotionDamageCalculations, areAllPotionsAmbient, attackable, attackEntityAsMob, attemptTeleport, blockUsingShield, canBeCollidedWith, canBeHitWithPotion, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, collideWithEntity, collideWithNearbyEntities, curePotionEffects, damageArmor, damageEntity, damageShield, decreaseAirSupply, dismountEntity, dismountRidingEntity, frostWalk, getAbsorptionAmount, getActiveHand, getActiveItemStack, getActivePotionEffect, getActivePotionEffects, getActivePotionMap, getAIMoveSpeed, getAlwaysRenderNameTagForRender, getArrowCountInEntity, getAttackingEntity, getAttributeMap, getCombatTracker, getCreatureAttribute, getEntityAttribute, getFallSound, getHealth, getHeldItem, getHeldItemMainhand, getHeldItemOffhand, getIdleTime, getItemInUseCount, getItemInUseMaxCount, getJumpUpwardsMotion, getLastAttackedEntity, getLastAttackedEntityTime, getLastDamageSource, getLook, getMaxHealth, getRevengeTarget, getRevengeTimer, getRNG, getRotationYawHead, getSoundPitch, getSwingProgress, getTicksElytraFlying, getTotalArmorValue, getWaterSlowDown, handleJumpLava, handleJumpWater, hasItemInSlot, heal, isActiveItemStackBlocking, isElytraFlying, isEntityAlive, isEntityUndead, isHandActive, isPlayer, isPlayerSleeping, isPotionActive, isPotionApplicable, jump, knockBack, markPotionsDirty, markVelocityChanged, moveRelative, onChangedPotionEffect, onDeathUpdate, onFinishedPotionEffect, onItemPickup, onItemUseFinish, onKillCommand, onNewPotionEffect, outOfWorld, performHurtAnimation, playEquipSound, removeActivePotionEffect, removePotionEffect, renderBrokenItemStack, resetActiveHand, resetPotionEffectMetadata, sendEndCombat, sendEnterCombat, setAbsorptionAmount, setActiveHand, setArrowCountInEntity, setHealth, setHeldItem, setJumping, setLastAttackedEntity, setPartying, setPositionAndRotationDirect, setRenderYawOffset, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, stopActiveHand, swingArm, updateActiveHand, updateArmSwingProgress, updateFallState, updateItemUse, updatePotionEffects, updatePotionMetadata, updateRiddenaddEntityCrashInfo, addPassenger, addTag, addTrackingPlayer, addVelocity, applyEnchantments, applyEntityCollision, applyOrientationToEntity, applyPlayerInteraction, awardKillScore, canBeAttackedWithItem, canBeRidden, canExplosionDestroyBlock, canFitPassenger, canRenderOnFire, canRiderInteract, canTrample, canTriggerWalking, canUseCommand, changeDimension, changeDimension, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, deserializeNBT, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, getAdjustedHorizontalFacing, getAir, getAlwaysRenderNameTag, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCommandStats, getCustomNameTag, getDataManager, getDisplayName, getDistance, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getFireImmuneTicks, getFlag, getForward, getHorizontalFacing, getHoverEvent, getIsInvulnerable, getLastPortalVec, getLookVec, getLowestRidingEntity, getMaxInPortalTime, getMirroredYaw, getMountedYOffset, getName, getParts, getPassengers, getPersistentID, getPickedResult, getPitchYaw, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getPushReaction, getRecursivePassengers, getRecursivePassengersByType, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getServer, getSoundCategory, getSplashSound, getSwimSound, getTags, getTeam, getTeleportDirection, getUniqueID, getVectorForRotation, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hitByEntity, ignoreItemEntityData, isAddedToWorld, isBeingRidden, isBurning, isCreatureType, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isNonBoss, isOffsetPositionInLiquid, isOnSameTeam, isOnScoreboardTeam, isOutsideBorder, isOverWater, isPassenger, isPushedByWater, isRiding, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, makeFlySound, move, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onAddedToWorld, onCollideWithPlayer, onInsideBlock, onKillEntity, onRemovedFromWorld, onStruckByLightning, playFlySound, playSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, registerFixes, removePassenger, removePassengers, removeTag, removeTrackingPlayer, resetEntityId, resetPositionToBB, sendCommandFeedback, sendMessage, serializeNBT, setAir, setAlwaysRenderNameTag, setCommandStat, setCommandStats, setCustomNameTag, setDead, setDropItemsWhenDead, setEntityBoundingBox, setEntityId, setEntityInvulnerable, setFire, setFlag, setGlowing, setInvisible, setInWeb, setLocationAndAngles, setNoGravity, setOnFireFromLava, setOutsideBorder, setPortal, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRotation, setSilent, setSneaking, setUniqueId, setVelocity, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, toString, turn, writeToNBT, writeToNBTAtomically, writeToNBTOptionalprivate static final com.google.common.base.Predicate<Entity> IS_HORSE_BREEDING
protected static final IAttribute JUMP_STRENGTH
private static final DataParameter<java.lang.Byte> STATUS
private static final DataParameter<com.google.common.base.Optional<java.util.UUID>> OWNER_UNIQUE_ID
private int eatingCounter
private int openMouthCounter
private int jumpRearingCounter
public int tailCounter
public int sprintCounter
protected boolean horseJumping
protected ContainerHorseChest horseChest
protected int temper
protected float jumpPower
private boolean allowStandSliding
private float headLean
private float prevHeadLean
private float rearingAmount
private float prevRearingAmount
private float mouthOpenness
private float prevMouthOpenness
protected boolean canGallop
protected int gallopTime
private IItemHandler itemHandler
public AbstractHorse(World worldIn)
protected void initEntityAI()
initEntityAI in class EntityLivingprotected void entityInit()
entityInit in class EntityAgeableprotected boolean getHorseWatchableBoolean(int p_110233_1_)
protected void setHorseWatchableBoolean(int p_110208_1_,
boolean p_110208_2_)
public boolean isTame()
@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 isEatingHaystack()
public boolean isRearing()
public boolean isBreeding()
public void setBreeding(boolean breeding)
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 EntityLivingBaseprivate void eatingHorse()
public void fall(float distance,
float damageMultiplier)
fall in class EntityLivingBaseprotected int getInventorySize()
protected void initHorseChest()
protected void updateHorseSlots()
public void onInventoryChanged(IInventory invBasic)
onInventoryChanged in interface IInventoryChangedListener@Nullable protected AbstractHorse getClosestHorse(Entity entityIn, double distance)
public double getHorseJumpStrength()
@Nullable protected SoundEvent getDeathSound()
getDeathSound in class EntityLivingBase@Nullable protected SoundEvent getHurtSound(DamageSource damageSourceIn)
getHurtSound in class EntityLivingBase@Nullable protected SoundEvent getAmbientSound()
getAmbientSound in class EntityLivingpublic boolean canBeSaddled()
public boolean isHorseSaddled()
@Nullable protected SoundEvent getAngrySound()
protected void playStepSound(BlockPos pos, Block blockIn)
playStepSound in class Entityprotected void playGallopSound(SoundType p_190680_1_)
protected 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 void openGUI(EntityPlayer playerEntity)
protected boolean handleEating(EntityPlayer player, ItemStack stack)
protected void mountTo(EntityPlayer player)
protected boolean isMovementBlocked()
isMovementBlocked in class EntityLivingBasepublic boolean isBreedingItem(ItemStack stack)
isBreedingItem in class EntityAnimalprivate void moveTail()
public void onDeath(DamageSource cause)
onDeath in class EntityLivingBasepublic void onLivingUpdate()
onLivingUpdate in class EntityAnimalprotected void followMother()
public boolean canEatGrass()
public void onUpdate()
onUpdate in class EntityLivingprivate void openHorseMouth()
public void setEatingHaystack(boolean p_110227_1_)
public void setRearing(boolean rearing)
private void makeHorseRear()
public void makeMad()
public boolean setTamedBy(EntityPlayer player)
public void travel(float strafe,
float vertical,
float forward)
travel in class EntityLivingBasepublic static void registerFixesAbstractHorse(DataFixer fixer, java.lang.Class<?> entityClass)
public void writeEntityToNBT(NBTTagCompound compound)
writeEntityToNBT in class EntityAnimalpublic void readEntityFromNBT(NBTTagCompound compound)
readEntityFromNBT in class EntityAnimalpublic boolean canMateWith(EntityAnimal otherAnimal)
canMateWith in class EntityAnimalprotected boolean canMate()
@Nullable public EntityAgeable createChild(EntityAgeable ageable)
createChild in class EntityAgeableprotected void setOffspringAttributes(EntityAgeable p_190681_1_, AbstractHorse p_190681_2_)
public 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 Entityprotected float getModifiedMaxHealth()
protected double getModifiedJumpStrength()
protected double getModifiedMovementSpeed()
public boolean isOnLadder()
isOnLadder in class EntityLivingBasepublic float getEyeHeight()
getEyeHeight in class Entitypublic boolean wearsArmor()
public boolean isArmor(ItemStack stack)
public boolean replaceItemInInventory(int inventorySlot,
ItemStack itemStackIn)
replaceItemInInventory in class EntityLiving@Nullable public Entity getControllingPassenger()
getControllingPassenger in class Entity@Nullable public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingdata)
onInitialSpawn in class EntityLiving@Nullable public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing)
ICapabilityProvider
Basically, this method functions analogously to Map.get(Object).
getCapability 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'ICapabilityProvider.hasCapability(Capability, EnumFacing)
would return true.public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing)
ICapabilityProviderICapabilityProvider.getCapability(Capability, EnumFacing).
Basically, this method functions analogously to Map.containsKey(Object).
Example: A Pipe getting a cover placed on one side causing it lose the Inventory attachment function for that side.
This is a light weight version of getCapability, intended for metadata uses.
hasCapability 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'ICapabilityProvider.getCapability(Capability, EnumFacing)
must not return null.