public abstract class AbstractHorseEntity extends AnimalEntity implements IInventoryChangedListener, IJumpingMount
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
canGallop |
protected int |
gallopTime |
protected Inventory |
horseChest |
protected boolean |
horseJumping |
protected static IAttribute |
JUMP_STRENGTH |
protected float |
jumpPower |
int |
sprintCounter |
int |
tailCounter |
protected int |
temper |
forcedAge, forcedAgeTimer, growingAgeexperienceValue, goalSelector, inventoryArmorDropChances, inventoryHandsDropChances, jumpController, livingSoundTime, lookController, moveController, navigator, targetSelectoractiveItemStack, activeItemStackUseCount, arrowHitTimer, attackedAtYaw, attackingPlayer, brain, dead, deathTime, ENTITY_GRAVITY, hurtTime, idleTime, interpTargetHeadYaw, interpTargetPitch, interpTargetX, interpTargetY, interpTargetYaw, interpTargetZ, interpTicksHead, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, LIVING_FLAGS, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, moveVertical, NAMETAG_DISTANCE, newPosRotationIncrements, onGroundSpeedFactor, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomUnused1, randomUnused2, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, SLEEPING_SIZE, spinAttackDuration, SWIM_SPEED, swingingHand, swingProgress, swingProgressInt, ticksElytraFlying, ticksSinceLastSwing, unused180addedToChunk, cachedUniqueIdString, chunkCoordX, chunkCoordY, chunkCoordZ, collided, collidedHorizontally, collidedVertically, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, eyesInWater, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, hurtResistantTime, ignoreFrustumCheck, inLava, inPortal, inWater, isAirBorne, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, LOGGER, motionMultiplier, noClip, onGround, portalCounter, POSE, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, removed, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, submergedHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, worldfield_213139_a_| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHorseEntity(EntityType<? extends AbstractHorseEntity> type,
World p_i48563_2_) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
attackEntityFrom(DamageSource source,
float amount) |
boolean |
canBeLeashedTo(PlayerEntity player) |
boolean |
canBePushed() |
boolean |
canBeSaddled() |
boolean |
canBeSteered() |
boolean |
canEatGrass() |
boolean |
canJump() |
protected boolean |
canMate() |
boolean |
canMateWith(AnimalEntity otherAnimal) |
AgeableEntity |
createChild(AgeableEntity ageable) |
protected void |
dropInventory() |
void |
fall(float distance,
float damageMultiplier) |
protected void |
followMother() |
protected SoundEvent |
getAmbientSound() |
protected SoundEvent |
getAngrySound() |
<T> LazyOptional<T> |
getCapability(Capability<T> capability,
Direction facing)
Retrieves the Optional handler for the capability requested on the specific side.
|
Entity |
getControllingPassenger() |
protected SoundEvent |
getDeathSound() |
float |
getGrassEatingAmount(float p_110258_1_) |
double |
getHorseJumpStrength() |
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() |
protected float |
getStandingEyeHeight(Pose poseIn,
EntitySize sizeIn) |
int |
getTalkInterval() |
int |
getTemper() |
protected boolean |
handleEating(PlayerEntity player,
ItemStack stack) |
void |
handleStartJump(int p_184775_1_) |
void |
handleStatusUpdate(byte id) |
void |
handleStopJump() |
int |
increaseTemper(int p_110198_1_) |
protected void |
initExtraAI() |
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() |
void |
livingTick() |
void |
makeMad() |
protected void |
mountTo(PlayerEntity player) |
ILivingEntityData |
onInitialSpawn(IWorld worldIn,
DifficultyInstance difficultyIn,
SpawnReason reason,
ILivingEntityData spawnDataIn,
CompoundNBT dataTag) |
void |
onInventoryChanged(IInventory invBasic) |
protected void |
onLeashDistance(float p_142017_1_) |
void |
openGUI(PlayerEntity playerEntity) |
protected void |
playGallopSound(SoundType p_190680_1_) |
protected void |
playJumpSound() |
protected void |
playStepSound(BlockPos pos,
BlockState blockIn) |
void |
readAdditional(CompoundNBT compound) |
protected void |
registerAttributes() |
protected void |
registerData() |
protected void |
registerGoals() |
void |
remove(boolean keepData) |
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(AgeableEntity p_190681_1_,
AbstractHorseEntity p_190681_2_) |
void |
setOwnerUniqueId(java.util.UUID uniqueId) |
void |
setRearing(boolean rearing) |
boolean |
setTamedBy(PlayerEntity player) |
void |
setTemper(int temperIn) |
protected void |
spawnHorseParticles(boolean p_110216_1_) |
void |
tick() |
void |
travel(Vec3d p_213352_1_) |
protected void |
updateHorseSlots() |
void |
updatePassenger(Entity passenger) |
boolean |
wearsArmor() |
void |
writeAdditional(CompoundNBT compound) |
canBreed, canDespawn, consumeItemFromStack, func_223316_b, getBlockPathWeight, getExperiencePoints, getLoveCause, getYOffset, isInLove, processInteract, resetInLove, setInLove, setInLove, updateAITasksaddGrowth, ageUp, getGrowingAge, isChild, notifyDataManagerChange, onChildSpawnFromEgg, onGrowingAdult, setGrowingAgecanSpawn, followLeashSpeed, getBlockPathWeight, hasPath, updateLeashedStateattackEntityAsMob, baseTick, canAttack, canAttack, canEquipItem, canPassengerSteer, canPickUpLoot, checkDespawn, clearLeashed, createBodyController, createNavigator, detachHome, dropLoot, dropSpecialItems, eatGrassBonus, enablePersistence, faceEntity, func_204209_c, func_213346_cF, func_213363_a, func_213365_e, func_213381_d, func_213385_F, func_213387_K, func_213396_dB, func_223315_a, getArmorByChance, getArmorInventoryList, getAttackTarget, getDropChance, getEntitySenses, getHeldEquipment, getHomePosition, getHorizontalFaceSpeed, getItemStackFromSlot, getJumpController, getLeashed, getLeashHolder, getLookController, getLootTable, getMaxFallHeight, getMaximumHomeDistance, getMoveHelper, getNavigator, getPathPriority, getPrimaryHand, getSlotForItemStack, getVerticalFaceSpeed, handleFluidJump, isAggressive, isAIDisabled, isHolding, isInDaylight, isItemStackInSlot, isLeftHanded, isNoDespawnRequired, isNotColliding, isServerWorld, isWithinHomeDistanceCurrentPosition, isWithinHomeDistanceFromPosition, playAmbientSound, playHurtSound, preventDespawn, processInitialInteract, setAggroed, setAIMoveSpeed, setAttackTarget, setCanPickUpLoot, setDropChance, setEnchantmentBasedOnDifficulty, setEquipmentBasedOnDifficulty, setHomePosAndDistance, setItemStackToSlot, setLeashHolder, setLeftHanded, setMoveForward, setMoveStrafing, setMoveVertical, setNoAI, setPathPriority, shouldExchangeEquipment, spawnExplosionParticle, startRiding, updateDistance, updateEntityActionState, updateEquipmentIfNeededaddPotionEffect, applyArmorCalculations, applyEntityCollision, applyPotionDamageCalculations, areAllPotionsAmbient, attackable, attemptTeleport, blockUsingShield, canBeCollidedWith, canBeHitWithPotion, canBeRiddenInWater, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, clearBedPosition, collideWithEntity, collideWithNearbyEntities, createBrain, createSpawnPacket, curePotionEffects, damageArmor, damageEntity, damageShield, decreaseAirSupply, determineNextAir, dismountEntity, findAmmo, frostWalk, func_213314_bj, func_213343_cS, func_213344_a, func_213371_e, getAbsorptionAmount, getActiveHand, getActiveItemStack, getActivePotionEffect, getActivePotionEffects, getActivePotionMap, getAIMoveSpeed, getAlwaysRenderNameTagForRender, getArrowCountInEntity, getAttackingEntity, getAttribute, getAttributes, getBedDirection, getBedPosition, getBlockState, getBrain, getCombatTracker, getCreatureAttribute, getDrinkSound, getEatSound, getEyeHeight, getFallSound, getHealth, getHeldItem, getHeldItemMainhand, getHeldItemOffhand, getIdleTime, getItemInUseCount, getItemInUseMaxCount, getJumpUpwardsMotion, getLastAttackedEntity, getLastAttackedEntityTime, getLastDamageSource, getMaxHealth, getRenderScale, getRevengeTarget, getRevengeTimer, getRNG, getRotationYawHead, getSize, getSoundPitch, getSwimAnimation, getSwingProgress, getTicksElytraFlying, getTotalArmorValue, getVisibilityMultiplier, getWaterSlowDown, getYaw, handleFluidSneak, hasItemInSlot, heal, isActiveItemStackBlocking, isAlive, isElytraFlying, isEntityInsideOpaqueBlock, isEntityUndead, isHandActive, isPlayer, isPotionActive, isPotionApplicable, isSleeping, isSpinAttacking, jump, knockBack, lookAt, markPotionsDirty, markVelocityChanged, onChangedPotionEffect, onDeath, onDeathUpdate, onFinishedPotionEffect, onFoodEaten, onItemPickup, onItemUseFinish, onKillCommand, onNewPotionEffect, outOfWorld, performHurtAnimation, playEquipSound, removeActivePotionEffect, removePotionEffect, resetActiveHand, resetPotionEffectMetadata, sendBreakAnimation, sendBreakAnimation, sendEndCombat, sendEnterCombat, setAbsorptionAmount, setActiveHand, setArrowCountInEntity, setBedPosition, setHeadRotation, setHealth, setHeldItem, setIdleTime, setJumping, setLastAttackedEntity, setLivingFlag, setPartying, setPositionAndRotationDirect, setRenderYawOffset, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, spawnDrops, spinAttack, startSleeping, startSpinAttack, stopActiveHand, stopRiding, swingArm, updateArmSwingProgress, updateFallState, updateItemUse, updatePotionEffects, updatePotionMetadata, updateRidden, updateSpinAttack, wakeUpaddPassenger, addTag, addTrackingPlayer, addVelocity, allowLogging, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, areEyesInFluid, areEyesInFluid, awardKillScore, canBeAttackedWithItem, canBeRidden, canExplosionDestroyBlock, canFitPassenger, canRenderOnFire, canSwim, canTrample, canTriggerWalking, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, detach, determineNextStepDistance, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, entityDropItem, entityDropItem, entityDropItem, entityDropItem, equals, extinguish, fillCrashReport, func_213286_i, func_213296_b, func_213300_bk, func_213312_b, func_213320_d, func_213324_a, func_223307_a, func_223308_g, func_223310_a, func_223314_ad, getAbsoluteMotion, getAdjustedHorizontalFacing, getAir, getAllowedMovement, getBoundingBox, getBoundingBox, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSource, getCustomName, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getEyeHeight, getEyePosition, getFireImmuneTicks, getFlag, getForward, getHeight, getHighspeedSplashSound, getHorizontalFacing, getHoverEvent, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxAir, getMaxInPortalTime, getMirroredYaw, getMotion, getMountedYOffset, getName, getPassengers, getPermissionLevel, getPersistentData, getPitch, getPitchYaw, getPortalCooldown, getPose, getPosition, getPositionVec, getPositionVector, getPushReaction, getRecursivePassengers, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getScoreboardName, getServer, getSoundCategory, getSplashSound, getSubmergedHeight, getSwimSound, getTags, getTeam, getTeleportDirection, getType, getUniqueID, getVectorForRotation, getWidth, handleFluidAcceleration, handlePistonMovement, handleSneakMovement, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hasPermissionLevel, hitByEntity, ignoreItemEntityData, isAddedToWorld, isBeingRidden, isBurning, isCustomNameVisible, isEntityEqual, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInvisible, isInvisibleToPlayer, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubbleColumn, isInWaterRainOrBubbleColumn, isLiving, isNonBoss, isOffsetPositionInLiquid, isOnePlayerRiding, isOnSameTeam, isOnScoreboardTeam, isPassenger, isPassenger, isPassenger, isPoseClear, isPushedByWater, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSpectator, isSprinting, isSwimming, isWet, makeFlySound, move, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onKillEntity, onRemovedFromWorld, onStruckByLightning, playFlySound, playSound, playSwimSound, preparePlayerToSpawn, pushOutOfBlocks, read, recalculateSize, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, resetPositionToBB, revive, rotateTowards, sendMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFire, setFlag, setGlowing, setInLava, setInvisible, setInvulnerable, setLocationAndAngles, setMotion, setMotion, setMotionMultiplier, setNoGravity, setOnFireFromLava, setPortal, setPose, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRotation, setSilent, setSneaking, setSwimming, setUniqueId, setVelocity, setWorld, shouldReceiveErrors, shouldReceiveFeedback, shouldRenderSneaking, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, teleportKeepLoaded, toString, updatePortal, updateSwimming, writeUnlessPassenger, writeUnlessRemoved, writeWithoutTypeIdareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCapsclone, finalize, getClass, notify, notifyAll, wait, wait, waitcanBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getPickedResult, serializeNBT, shouldRiderSitgetCapabilityprotected static final IAttribute JUMP_STRENGTH
public int tailCounter
public int sprintCounter
protected boolean horseJumping
protected Inventory horseChest
protected int temper
protected float jumpPower
protected boolean canGallop
protected int gallopTime
protected AbstractHorseEntity(EntityType<? extends AbstractHorseEntity> type, World p_i48563_2_)
protected void registerGoals()
registerGoals in class MobEntityprotected void initExtraAI()
protected void registerData()
registerData in class AgeableEntityprotected 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 boolean isHorseJumping()
public void setHorseTamed(boolean tamed)
public void setHorseJumping(boolean jumping)
public boolean canBeLeashedTo(PlayerEntity player)
canBeLeashedTo in class MobEntityprotected void onLeashDistance(float p_142017_1_)
onLeashDistance in class CreatureEntitypublic 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 AnimalEntitypublic boolean canBePushed()
canBePushed in class LivingEntitypublic void fall(float distance,
float damageMultiplier)
fall in class LivingEntityprotected int getInventorySize()
protected void initHorseChest()
protected void updateHorseSlots()
public void onInventoryChanged(IInventory invBasic)
onInventoryChanged in interface IInventoryChangedListenerpublic double getHorseJumpStrength()
@Nullable protected SoundEvent getDeathSound()
getDeathSound in class LivingEntity@Nullable protected SoundEvent getHurtSound(DamageSource damageSourceIn)
getHurtSound in class LivingEntity@Nullable protected SoundEvent getAmbientSound()
getAmbientSound in class MobEntitypublic boolean canBeSaddled()
public boolean isHorseSaddled()
@Nullable protected SoundEvent getAngrySound()
protected void playStepSound(BlockPos pos, BlockState blockIn)
playStepSound in class Entityprotected void playGallopSound(SoundType p_190680_1_)
protected void registerAttributes()
registerAttributes in class MobEntitypublic int getMaxSpawnedInChunk()
getMaxSpawnedInChunk in class MobEntitypublic int getMaxTemper()
protected float getSoundVolume()
getSoundVolume in class LivingEntitypublic int getTalkInterval()
getTalkInterval in class AnimalEntitypublic void openGUI(PlayerEntity playerEntity)
protected boolean handleEating(PlayerEntity player, ItemStack stack)
protected void mountTo(PlayerEntity player)
protected boolean isMovementBlocked()
isMovementBlocked in class LivingEntitypublic boolean isBreedingItem(ItemStack stack)
isBreedingItem in class AnimalEntityprotected void dropInventory()
dropInventory in class LivingEntitypublic void livingTick()
livingTick in class AnimalEntityprotected void followMother()
public boolean canEatGrass()
public void setEatingHaystack(boolean p_110227_1_)
public void setRearing(boolean rearing)
public void makeMad()
public boolean setTamedBy(PlayerEntity player)
public void travel(Vec3d p_213352_1_)
travel in class LivingEntityprotected void playJumpSound()
public void writeAdditional(CompoundNBT compound)
writeAdditional in class AnimalEntitypublic void readAdditional(CompoundNBT compound)
readAdditional in class AnimalEntitypublic boolean canMateWith(AnimalEntity otherAnimal)
canMateWith in class AnimalEntityprotected boolean canMate()
@Nullable public AgeableEntity createChild(AgeableEntity ageable)
createChild in class AgeableEntityprotected void setOffspringAttributes(AgeableEntity p_190681_1_, AbstractHorseEntity p_190681_2_)
public boolean canBeSteered()
canBeSteered in class MobEntitypublic 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 AnimalEntitypublic void updatePassenger(Entity passenger)
updatePassenger in class Entityprotected float getModifiedMaxHealth()
protected double getModifiedJumpStrength()
protected double getModifiedMovementSpeed()
public boolean isOnLadder()
isOnLadder in class LivingEntityprotected float getStandingEyeHeight(Pose poseIn, EntitySize sizeIn)
getStandingEyeHeight in class LivingEntitypublic boolean wearsArmor()
public boolean isArmor(ItemStack stack)
public boolean replaceItemInInventory(int inventorySlot,
ItemStack itemStackIn)
replaceItemInInventory in class MobEntity@Nullable public Entity getControllingPassenger()
getControllingPassenger in class Entity@Nullable public ILivingEntityData onInitialSpawn(IWorld worldIn, DifficultyInstance difficultyIn, SpawnReason reason, @Nullable ILivingEntityData spawnDataIn, @Nullable CompoundNBT dataTag)
onInitialSpawn in class MobEntitypublic <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction facing)
ICapabilityProvidergetCapability in interface ICapabilityProvidergetCapability in class LivingEntitypublic void remove(boolean keepData)
remove in class LivingEntity