Package net.minecraft.entity.passive
Class HorseBaseEntity
- All Implemented Interfaces:
JumpingMount
,Saddleable
,InventoryChangedListener
,CommandOutput
,Nameable
- Direct Known Subclasses:
AbstractDonkeyEntity
,HorseEntity
,SkeletonHorseEntity
,ZombieHorseEntity
public abstract class HorseBaseEntity extends AnimalEntity implements InventoryChangedListener, JumpingMount, Saddleable
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.passive.PassiveEntity
PassiveEntity.PassiveData
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.PositionUpdater
-
Field Summary
Fields Modifier and Type Field Description private float
angryAnimationProgress
private int
angryTicks
private float
eatingAnimationProgress
private float
eatingGrassAnimationProgress
private int
eatingGrassTicks
private int
eatingTicks
private static Ingredient
field_25374
int
field_6958
private static TrackedData<Byte>
HORSE_FLAGS
protected boolean
inAir
private static Predicate<LivingEntity>
IS_BRED_HORSE
protected SimpleInventory
items
private boolean
jumping
protected float
jumpStrength
private float
lastAngryAnimationProgress
private float
lastEatingAnimationProgress
private float
lastEatingGrassAnimationProgress
private static TrackedData<Optional<UUID>>
OWNER_UUID
private static TargetPredicate
PARENT_HORSE_PREDICATE
protected boolean
playExtraHorseSounds
protected int
soundTicks
int
tailWagTicks
protected int
temper
Fields inherited from class net.minecraft.entity.passive.PassiveEntity
breedingAge, forcedAge, happyTicksRemaining
Fields inherited from class net.minecraft.entity.mob.MobEntity
ambientSoundChance, armorDropChances, experiencePoints, goalSelector, handDropChances, jumpControl, lookControl, moveControl, navigation, targetSelector
Fields inherited from class net.minecraft.entity.LivingEntity
activeItemStack, attackingPlayer, bodyTrackingIncrements, bodyYaw, brain, dead, deathTime, defaultMaxHealth, despawnCounter, field_6215, flyingSpeed, forwardSpeed, handSwinging, handSwingProgress, handSwingTicks, headTrackingIncrements, headYaw, hurtTime, itemUseTimeLeft, knockbackVelocity, lastAttackedTicks, lastDamageTaken, lastHandSwingProgress, lastLimbDistance, limbAngle, limbDistance, LIVING_FLAGS, lookDirection, maxHurtTime, playerHitTimer, preferredHand, prevBodyYaw, prevHeadYaw, prevLookDirection, prevStepBobbingAmount, randomLargeSeed, randomSmallSeed, riptideTicks, roll, scoreAmount, serverHeadYaw, serverPitch, serverX, serverY, serverYaw, serverZ, sidewaysSpeed, SLEEPING_DIMENSIONS, stepBobbingAmount, stuckArrowTimer, stuckStingerTimer, upwardSpeed
Fields inherited from class net.minecraft.entity.Entity
age, chunkX, chunkY, chunkZ, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, removed, ridingCooldown, stepHeight, submergedInWater, teleporting, timeUntilRegen, touchingWater, updateNeeded, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yaw
Fields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY
-
Constructor Summary
Constructors Modifier Constructor Description protected
HorseBaseEntity(EntityType<? extends HorseBaseEntity> type, World world)
-
Method Summary
Modifier and Type Method Description int
addTemper(int difference)
boolean
bondWithPlayer(PlayerEntity player)
boolean
canBeControlledByRider()
boolean
canBeSaddled()
protected boolean
canBreed()
boolean
canBreedWith(AnimalEntity other)
boolean
canJump()
protected int
computeFallDamage(float fallDistance, float damageMultiplier)
static DefaultAttributeContainer.Builder
createBaseHorseAttributes()
PassiveEntity
createChild(ServerWorld world, PassiveEntity entity)
protected void
dropInventory()
boolean
eatsGrass()
boolean
equip(int slot, ItemStack item)
protected float
getActiveEyeHeight(EntityPose pose, EntityDimensions dimensions)
protected SoundEvent
getAmbientSound()
float
getAngryAnimationProgress(float tickDelta)
protected SoundEvent
getAngrySound()
protected float
getChildHealthBonus()
protected double
getChildJumpStrengthBonus()
protected double
getChildMovementSpeedBonus()
protected SoundEvent
getDeathSound()
float
getEatingAnimationProgress(float tickDelta)
float
getEatingGrassAnimationProgress(float tickDelta)
protected SoundEvent
getEatSound()
protected boolean
getHorseFlag(int bitmask)
protected SoundEvent
getHurtSound(DamageSource source)
protected int
getInventorySize()
double
getJumpStrength()
int
getLimitPerChunk()
int
getMaxTemper()
int
getMinAmbientSoundDelay()
UUID
getOwnerUuid()
Entity
getPrimaryPassenger()
protected float
getSoundVolume()
int
getTemper()
boolean
handleFallDamage(float fallDistance, float damageMultiplier)
void
handleStatus(byte status)
boolean
hasArmorInSlot()
Whether this horse already has an item stack in its horse armor slot.boolean
hasArmorSlot()
Whether this horse has a slot for custom equipment besides a saddle.protected void
initAttributes()
protected void
initCustomGoals()
protected void
initDataTracker()
protected void
initGoals()
EntityData
initialize(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, EntityData entityData, CompoundTag entityTag)
boolean
isAngry()
boolean
isBred()
boolean
isBreedingItem(ItemStack stack)
boolean
isClimbing()
boolean
isEatingGrass()
boolean
isHorseArmor(ItemStack item)
Whether the given item stack is valid for this horse's armor slot.protected boolean
isImmobile()
boolean
isInAir()
boolean
isPushable()
boolean
isSaddled()
boolean
isTame()
private Vec3d
method_27930(Vec3d vec3d, LivingEntity livingEntity)
ActionResult
method_30009(PlayerEntity playerEntity, ItemStack itemStack)
protected void
onChestedStatusChanged()
void
onInventoryChanged(Inventory sender)
void
openInventory(PlayerEntity player)
void
playAngrySound()
private void
playEatingAnimation()
protected void
playJumpSound()
protected void
playStepSound(BlockPos pos, BlockState state)
protected void
playWalkSound(BlockSoundGroup group)
protected void
putPlayerOnBack(PlayerEntity player)
void
readCustomDataFromTag(CompoundTag tag)
protected boolean
receiveFood(PlayerEntity player, ItemStack item)
void
saddle(SoundCategory sound)
void
setAngry(boolean angry)
void
setBred(boolean bred)
protected void
setChildAttributes(PassiveEntity mate, HorseBaseEntity child)
private void
setEating()
void
setEatingGrass(boolean eatingGrass)
protected void
setHorseFlag(int bitmask, boolean flag)
void
setInAir(boolean inAir)
void
setJumpStrength(int strength)
void
setOwnerUuid(UUID uuid)
void
setTame(boolean tame)
void
setTemper(int temper)
protected void
spawnPlayerReactionParticles(boolean positive)
void
startJumping(int height)
void
stopJumping()
void
tick()
void
tickMovement()
void
travel(Vec3d movementInput)
private void
updateAnger()
protected void
updateForLeashLength(float leashLength)
Vec3d
updatePassengerForDismount(LivingEntity passenger)
void
updatePassengerPosition(Entity passenger)
protected void
updateSaddle()
private void
wagTail()
protected void
walkToParent()
void
writeCustomDataToTag(CompoundTag tag)
Methods inherited from class net.minecraft.entity.passive.AnimalEntity
breed, canEat, canImmediatelyDespawn, damage, eat, getCurrentExperience, getHeightOffset, getLoveTicks, getLovingPlayer, getPathfindingFavor, interactMob, isInLove, isValidNaturalSpawn, lovePlayer, mobTick, resetLoveTicks, setLoveTicks
Methods inherited from class net.minecraft.entity.passive.PassiveEntity
getBreedingAge, growUp, growUp, isBaby, isReadyToBreed, onGrowUp, onTrackedDataSet, setBaby, setBreedingAge
Methods inherited from class net.minecraft.entity.mob.PathAwareEntity
canSpawn, getPathfindingFavor, getRunFromLeashSpeed, isNavigating, updateLeash
Methods inherited from class net.minecraft.entity.mob.MobEntity
attachLeash, baseTick, canBeLeashedBy, canEquip, canEquipmentSlotContain, canGather, canMobSpawn, canMoveVoluntarily, cannotDespawn, canPickupItem, canPickUpLoot, canSpawn, canTarget, canTarget, canUseRangedWeapon, checkDespawn, createBodyControl, createMobAttributes, createNavigation, detachLeash, dropEquipment, dropLoot, equipLootStack, equipStack, getArmorItems, getBodyYawSpeed, getDropChance, getEquipmentForSlot, getEquippedStack, getHoldingEntity, getItemsHand, getJumpControl, getLookControl, getLookPitchSpeed, getLookYawSpeed, getLootContextBuilder, getLootTable, getLootTableId, getMainArm, getMoveControl, getNavigation, getPathfindingPenalty, getPositionTarget, getPositionTargetRange, getPreferredEquipmentSlot, getSafeFallDistance, getTarget, getVisibilityCache, hasPositionTarget, initEquipment, interact, isAffectedByDaylight, isAiDisabled, isAttacking, isDisallowedInPeaceful, isInWalkTargetRange, isInWalkTargetRange, isLeashed, isLeftHanded, isLogicalSideForUpdatingMovement, isPersistent, lookAtEntity, loot, method_29243, method_29244, method_30076, method_30758, method_30759, movesIndependently, onEatingGrass, onPlayerSpawnedChild, playAmbientSound, playHurtSound, playSpawnEffects, prefersNewDamageableItem, prefersNewEquipment, sendAiDebugData, setAiDisabled, setAttacking, setCanPickUpLoot, setEquipmentDropChance, setForwardSpeed, setHoldingEntityId, setLeftHanded, setMovementSpeed, setPathfindingPenalty, setPersistent, setPositionTarget, setSidewaysSpeed, setTarget, setUpwardSpeed, spawnsTooManyForEachTry, startRiding, swimUpward, tickNewAi, tryAttack, tryEquip, turnHead, updateDropChances, updateEnchantments, updateGoalControls
Methods inherited from class net.minecraft.entity.LivingEntity
addSoulSpeedBoostIfNeeded, addStatusEffect, animateDamage, applyArmorToDamage, applyDamage, applyEnchantmentsToDamage, applyMovementEffects, applyStatusEffect, attackLivingEntity, canBeRiddenInWater, canBreatheInWater, canDropLootAndXp, canHaveStatusEffect, canSee, canWalkOnFluid, clearActiveItem, clearPotionSwirls, clearSleepingPosition, clearStatusEffects, collides, consumeItem, containsOnlyAmbientEffects, createBrainProfile, createLivingAttributes, createSpawnPacket, damageArmor, damageShield, deserializeBrain, destroy, displaySoulSpeedEffects, drop, dropXp, eatFood, endCombat, enterCombat, fall, getAbsorptionAmount, getActiveHand, getActiveItem, getActiveStatusEffects, getArmor, getArmorVisibility, getArrowType, getAttackDistanceScalingFactor, getAttacker, getAttacking, getAttributeBaseValue, getAttributeInstance, getAttributes, getAttributeValue, getBaseMovementSpeedMultiplier, getBlockState, getBoundingBox, getBrain, getClimbingPos, getDamageTracker, getDespawnCounter, getDimensions, getDrinkSound, getEatSound, getEyeHeight, getFallSound, getGroup, getHandSwingProgress, getHeadYaw, getHealth, getItemUseTime, getItemUseTimeLeft, getJumpVelocity, getLastAttackedTime, getLastAttackTime, getLeaningPitch, getMainHandStack, getMaxHealth, getMovementSpeed, getNextAirOnLand, getNextAirUnderwater, getOffHandStack, getPoses, getPrimeAdversary, getRandom, getRecentDamageSource, getRoll, getScaleFactor, getSleepingDirection, getSleepingPosition, getSoundPitch, getStackInHand, getStatusEffect, getStatusEffects, getStingerCount, getStuckArrowCount, getVelocityMultiplier, getVisibilityBoundingBox, getYaw, hasStackEquipped, hasStatusEffect, heal, hurtByWater, isAffectedBySplashPotions, isAlive, isBlocking, isDead, isFallFlying, isHolding, isHolding, isHoldingOntoLadder, isInsideWall, isInSwimmingPose, isMobOrPlayer, isOnSoulSpeedBlock, isSleeping, isTarget, isUndead, isUsingItem, isUsingRiptide, jump, kill, knockback, knockDownwards, lookAt, markEffectsDirty, method_26317, method_26318, method_29242, method_29499, method_29500, method_29920, method_30633, method_31079, onAttacking, onDeath, onEquipStack, onKilledBy, onStatusEffectApplied, onStatusEffectRemoved, onStatusEffectUpgraded, playBlockFallSound, pushAway, pushAwayFrom, removeSoulSpeedBoost, removeStatusEffect, removeStatusEffectInternal, scheduleVelocityUpdate, sendEquipmentBreakStatus, sendPickup, sendToolBreakStatus, setAbsorptionAmount, setAttacker, setAttacking, setCurrentHand, setDespawnCounter, setHeadYaw, setHealth, setJumping, setLivingFlag, setNearbySongPlaying, setOnGround, setRiptideTicks, setSleepingPosition, setSprinting, setStackInHand, setStingerCount, setStuckArrowCount, setYaw, shouldAlwaysDropXp, shouldDisplaySoulSpeedEffects, shouldDropLoot, shouldRenderName, sleep, spawnConsumptionEffects, stopRiding, stopUsingItem, swingHand, swingHand, takeKnockback, takeShieldHit, teleport, tickCramming, tickHandSwing, tickRiding, tickRiptide, tickStatusEffects, updatePostDeath, updatePotionVisibility, updateTrackedHeadRotation, updateTrackedPositionAndAngles, wakeUp
Methods inherited from class net.minecraft.entity.Entity
addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, adjustSingleAxisMovementForCollisions, afterSpawn, applyMirror, applyRotation, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeSpectated, canClimb, canExplosionDestroyBlock, canFly, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, collidesWith, copyFrom, copyPositionAndRotation, dealDamage, detach, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, entityDataRequiresOperator, equals, extinguish, fromTag, getAir, getBlockPos, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeY, getFireTicks, getFlag, getFluidHeight, getHeight, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getItemsEquipped, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMaxNetherPortalTime, getMountedHeightOffset, getMovementDirection, getName, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPistonBehavior, getPitch, getPos, getPose, getRandomBodyY, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSavedEntityId, getScoreboardTags, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStandingEyeHeight, getSwimSound, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getWidth, getX, getY, getZ, handleAttack, hasCustomName, hashCode, hasNetherPortalCooldown, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasVehicle, hasWings, interactAt, isAttackable, isChunkPosUpdateRequested, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWaterOrBubbleColumn, isInSneakingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isOnFire, isOnGround, isPartOf, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, method_29239, method_29241, method_29919, method_30330, method_30632, method_30634, method_30950, method_30951, method_31166, move, moveToBoundingBoxCenter, moveToWorld, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onPlayerCollision, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, playFlySound, playSound, playSwimSound, populateCrashReport, pushOutOfBlocks, raycast, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, remove, removeAllPassengers, removePassenger, removeScoreboardTag, requestTeleport, resetNetherPortalCooldown, resetPosition, saveSelfToTag, saveToTag, sendSystemMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFireTicks, setFlag, setGlowing, setInNetherPortal, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setPos, setPose, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setWorld, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, streamPassengersRecursively, teleport, teleportRequested, tickNetherPortal, tickNetherPortalCooldown, toListTag, toListTag, toString, toTag, updateKilledAdvancementCriterion, updateMovementInFluid, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollide
-
Field Details
-
IS_BRED_HORSE
-
PARENT_HORSE_PREDICATE
-
field_25374
-
HORSE_FLAGS
-
OWNER_UUID
-
eatingGrassTicks
private int eatingGrassTicks -
eatingTicks
private int eatingTicks -
angryTicks
private int angryTicks -
tailWagTicks
public int tailWagTicks -
field_6958
public int field_6958 -
inAir
protected boolean inAir -
items
-
temper
protected int temper -
jumpStrength
protected float jumpStrength -
jumping
private boolean jumping -
eatingGrassAnimationProgress
private float eatingGrassAnimationProgress -
lastEatingGrassAnimationProgress
private float lastEatingGrassAnimationProgress -
angryAnimationProgress
private float angryAnimationProgress -
lastAngryAnimationProgress
private float lastAngryAnimationProgress -
eatingAnimationProgress
private float eatingAnimationProgress -
lastEatingAnimationProgress
private float lastEatingAnimationProgress -
playExtraHorseSounds
protected boolean playExtraHorseSounds -
soundTicks
protected int soundTicks
-
-
Constructor Details
-
HorseBaseEntity
-
-
Method Details
-
initGoals
protected void initGoals() -
initCustomGoals
protected void initCustomGoals() -
initDataTracker
protected void initDataTracker()- Overrides:
initDataTracker
in classPassiveEntity
-
getHorseFlag
protected boolean getHorseFlag(int bitmask) -
setHorseFlag
protected void setHorseFlag(int bitmask, boolean flag) -
isTame
public boolean isTame() -
getOwnerUuid
-
setOwnerUuid
-
isInAir
public boolean isInAir() -
setTame
public void setTame(boolean tame) -
setInAir
public void setInAir(boolean inAir) -
updateForLeashLength
protected void updateForLeashLength(float leashLength)- Overrides:
updateForLeashLength
in classPathAwareEntity
-
isEatingGrass
public boolean isEatingGrass() -
isAngry
public boolean isAngry() -
isBred
public boolean isBred() -
setBred
public void setBred(boolean bred) -
canBeSaddled
public boolean canBeSaddled()- Specified by:
canBeSaddled
in interfaceSaddleable
-
saddle
- Specified by:
saddle
in interfaceSaddleable
-
isSaddled
public boolean isSaddled()- Specified by:
isSaddled
in interfaceSaddleable
-
getTemper
public int getTemper() -
setTemper
public void setTemper(int temper) -
addTemper
public int addTemper(int difference) -
isPushable
public boolean isPushable()- Overrides:
isPushable
in classLivingEntity
-
playEatingAnimation
private void playEatingAnimation() -
handleFallDamage
public boolean handleFallDamage(float fallDistance, float damageMultiplier)- Overrides:
handleFallDamage
in classLivingEntity
-
computeFallDamage
protected int computeFallDamage(float fallDistance, float damageMultiplier)- Overrides:
computeFallDamage
in classLivingEntity
-
getInventorySize
protected int getInventorySize() -
onChestedStatusChanged
protected void onChestedStatusChanged() -
updateSaddle
protected void updateSaddle() -
onInventoryChanged
- Specified by:
onInventoryChanged
in interfaceInventoryChangedListener
-
getJumpStrength
public double getJumpStrength() -
getEatSound
-
getDeathSound
- Overrides:
getDeathSound
in classLivingEntity
-
getHurtSound
- Overrides:
getHurtSound
in classLivingEntity
-
getAmbientSound
- Overrides:
getAmbientSound
in classMobEntity
-
getAngrySound
-
playStepSound
- Overrides:
playStepSound
in classEntity
-
playWalkSound
-
createBaseHorseAttributes
-
getLimitPerChunk
public int getLimitPerChunk()- Overrides:
getLimitPerChunk
in classMobEntity
-
getMaxTemper
public int getMaxTemper() -
getSoundVolume
protected float getSoundVolume()- Overrides:
getSoundVolume
in classLivingEntity
-
getMinAmbientSoundDelay
public int getMinAmbientSoundDelay()- Overrides:
getMinAmbientSoundDelay
in classAnimalEntity
-
openInventory
-
method_30009
-
receiveFood
-
putPlayerOnBack
-
isImmobile
protected boolean isImmobile()- Overrides:
isImmobile
in classLivingEntity
-
isBreedingItem
- Overrides:
isBreedingItem
in classAnimalEntity
-
wagTail
private void wagTail() -
dropInventory
protected void dropInventory()- Overrides:
dropInventory
in classLivingEntity
-
tickMovement
public void tickMovement()- Overrides:
tickMovement
in classAnimalEntity
-
walkToParent
protected void walkToParent() -
eatsGrass
public boolean eatsGrass() -
tick
public void tick() -
setEating
private void setEating() -
setEatingGrass
public void setEatingGrass(boolean eatingGrass) -
setAngry
public void setAngry(boolean angry) -
updateAnger
private void updateAnger() -
playAngrySound
public void playAngrySound() -
bondWithPlayer
-
travel
- Overrides:
travel
in classLivingEntity
-
playJumpSound
protected void playJumpSound() -
writeCustomDataToTag
- Overrides:
writeCustomDataToTag
in classAnimalEntity
-
readCustomDataFromTag
- Overrides:
readCustomDataFromTag
in classAnimalEntity
-
canBreedWith
- Overrides:
canBreedWith
in classAnimalEntity
-
canBreed
protected boolean canBreed() -
createChild
- Specified by:
createChild
in classPassiveEntity
-
setChildAttributes
-
canBeControlledByRider
public boolean canBeControlledByRider()- Overrides:
canBeControlledByRider
in classMobEntity
-
getEatingGrassAnimationProgress
@Environment(CLIENT) public float getEatingGrassAnimationProgress(float tickDelta) -
getAngryAnimationProgress
@Environment(CLIENT) public float getAngryAnimationProgress(float tickDelta) -
getEatingAnimationProgress
@Environment(CLIENT) public float getEatingAnimationProgress(float tickDelta) -
setJumpStrength
@Environment(CLIENT) public void setJumpStrength(int strength)- Specified by:
setJumpStrength
in interfaceJumpingMount
-
canJump
public boolean canJump()- Specified by:
canJump
in interfaceJumpingMount
-
startJumping
public void startJumping(int height)- Specified by:
startJumping
in interfaceJumpingMount
-
stopJumping
public void stopJumping()- Specified by:
stopJumping
in interfaceJumpingMount
-
spawnPlayerReactionParticles
@Environment(CLIENT) protected void spawnPlayerReactionParticles(boolean positive) -
handleStatus
@Environment(CLIENT) public void handleStatus(byte status)- Overrides:
handleStatus
in classAnimalEntity
-
updatePassengerPosition
- Overrides:
updatePassengerPosition
in classEntity
-
getChildHealthBonus
protected float getChildHealthBonus() -
getChildJumpStrengthBonus
protected double getChildJumpStrengthBonus() -
getChildMovementSpeedBonus
protected double getChildMovementSpeedBonus() -
isClimbing
public boolean isClimbing()- Overrides:
isClimbing
in classLivingEntity
-
getActiveEyeHeight
- Overrides:
getActiveEyeHeight
in classLivingEntity
-
hasArmorSlot
public boolean hasArmorSlot()Whether this horse has a slot for custom equipment besides a saddle.In the item slot argument type, the slot is referred to as
horse.armor
. In this horse's screen, it appears in the middle of the left side, and right below the saddle slot if this horse has a saddle slot.This is used by horse armors and llama carpets, but can be refitted to any purpose.
-
hasArmorInSlot
public boolean hasArmorInSlot()Whether this horse already has an item stack in its horse armor slot.- See Also:
hasArmorSlot()
-
isHorseArmor
Whether the given item stack is valid for this horse's armor slot.- See Also:
hasArmorSlot()
-
equip
-
getPrimaryPassenger
- Overrides:
getPrimaryPassenger
in classEntity
-
method_27930
-
updatePassengerForDismount
- Overrides:
updatePassengerForDismount
in classEntity
-
initAttributes
protected void initAttributes() -
initialize
@Nullable public EntityData initialize(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, @Nullable EntityData entityData, @Nullable CompoundTag entityTag)- Overrides:
initialize
in classPassiveEntity
-