net.minecraft.entity.passive

public abstract class AbstractHorseEntity

extends AnimalEntity implements JumpingMount, RideableInventory, Tameable

All mapped superinterfaces:

Nameable, EntityLike, UniquelyIdentifiable, ScoreHolder, DataTracked, ComponentsAccess, HeldItemContext, StackReferenceGetter, DebugTrackable, EntryConvertible, Attackable, ServerWaypoint, Waypoint, Targeter, EquipmentHolder, Leashable, JumpingMount, Mount, RideableInventory, Tameable

net.minecraft.world.entity.animal.equine.AbstractHorse
net.minecraft.class_1496
net.minecraft.entity.passive.AbstractHorseEntity

Field summary

Modifier and TypeField
public static final int
CHEST_SLOT_OFFSET
field_30414
field_30414
public static final int
INVENTORY_SLOT_OFFSET
field_30415
field_30415
public static final double
BREEDING_CROSS_FACTOR
field_42647
field_42647
private static final float
MIN_MOVEMENT_SPEED
field_42641
MIN_MOVEMENT_SPEED_BONUS
private static final float
MAX_MOVEMENT_SPEED
field_42642
MAX_MOVEMENT_SPEED_BONUS
private static final float
MIN_JUMP_STRENGTH
field_42643
MIN_JUMP_STRENGTH_BONUS
private static final float
MAX_JUMP_STRENGTH
field_42644
MAX_JUMP_STRENGTH_BONUS
private static final float
MIN_HEALTH
field_42645
MIN_HEALTH_BONUS
private static final float
MAX_HEALTH
field_42646
MAX_HEALTH_BONUS
private static final float
BACKWARDS_MOVE_SPEED_FACTOR
field_42979
field_42979
private static final float
SIDEWAYS_MOVE_SPEED_FACTOR
field_42980
field_42980
private static final TargetPredicate$EntityPredicate
PARENT_HORSE_SELECTOR
field_6956
IS_BRED_HORSE
private static final TargetPredicate
MOMMY_TARGETING
field_18118
PARENT_HORSE_PREDICATE
private static final TrackedData<Byte>
DATA_ID_FLAGS
field_6959
HORSE_FLAGS
private static final int
FLAG_TAME
field_30419
TAMED_FLAG
private static final int
FLAG_BRED
field_30421
BRED_FLAG
private static final int
FLAG_EATING
field_30422
EATING_GRASS_FLAG
private static final int
FLAG_STANDING
field_30423
ANGRY_FLAG
private static final int
FLAG_OPEN_MOUTH
field_30424
EATING_FLAG
protected static final float
BABY_SCALE
field_1_1115
field_1_1115
public static final int
INVENTORY_ROWS
field_52488
field_52488
private static final int
DEFAULT_TEMPER
field_57630
DEFAULT_TEMPER
private static final boolean
DEFAULT_EATING_HAYSTACK
field_57631
DEFAULT_EATING_GRASS
private static final boolean
DEFAULT_BRED
field_57632
DEFAULT_BRED
private static final boolean
DEFAULT_TAME
field_57633
DEFAULT_TAME
private int
eatingCounter
field_6971
eatingGrassTicks
private int
mouthCounter
field_6973
eatingTicks
private int
standCounter
field_6970
angryTicks
public int
tailCounter
field_6957
tailWagTicks
public int
sprintCounter
field_6958
field_6958
protected SimpleInventory
inventory
field_6962
items
protected int
temper
field_6955
temper
protected float
playerJumpPendingScale
field_6976
jumpStrength
protected boolean
allowStandSliding
field_6960
jumping
private float
eatAnim
field_6969
eatingGrassAnimationProgress
private float
eatAnimO
field_6966
lastEatingGrassAnimationProgress
private float
standAnim
field_6967
angryAnimationProgress
private float
standAnimO
field_6963
lastAngryAnimationProgress
private float
mouthAnim
field_6965
eatingAnimationProgress
private float
mouthAnimO
field_6961
lastEatingAnimationProgress
protected boolean
canGallop
field_6964
playExtraHorseSounds
protected int
gallopSoundCounter
field_6975
soundTicks
private LazyEntityReference<LivingEntity>
owner
field_55705
ownerReference

Constructor summary

ModifierConstructor
protected (EntityType<? extends AbstractHorseEntity> type, World level)

Method summary

Modifier and TypeMethod
protected void
registerGoals()
method_5959()
initGoals()
protected void
addBehaviourGoals()
method_6764()
initCustomGoals()
protected void
defineSynchedData(SynchedEntityData$Builder entityData)
method_5693(class_2945$class_9222 arg0)
initDataTracker(DataTracker$Builder arg0)
protected boolean
getFlag(int flag)
method_6730(int arg0)
getHorseFlag(int bitmask)
protected void
setFlag(int flag, boolean value)
method_6769(int arg0, boolean arg1)
setHorseFlag(int bitmask, boolean flag)
public boolean
isTamed()
method_6727()
isTame()
public LazyEntityReference<LivingEntity>
getOwnerReference()
method_66287()
getOwnerReference()
public void
setOwner(LivingEntity owner)
method_66323(class_1309 arg0)
setOwner(LivingEntity entity)
public void
setTamed(boolean flag)
method_6766(boolean arg0)
setTame(boolean tame)
public void
onElasticLeashPull()
method_71006()
onLongLeashTick()
public boolean
supportQuadLeash()
method_70991()
canUseQuadLeashAttachmentPoint()
public Vec3d[]
getQuadLeashOffsets()
method_70992()
getQuadLeashOffsets()
public boolean
isEating()
method_6724()
isEatingGrass()
public boolean
isStanding()
method_6736()
isAngry()
public boolean
isBred()
method_6744()
isBred()
public void
setBred(boolean flag)
method_6751(boolean arg0)
setBred(boolean bred)
public boolean
canUseSlot(EquipmentSlot slot)
method_56991(class_1304 arg0)
canUseSlot(EquipmentSlot arg0)
public void
equipBodyArmor(Player player, ItemStack itemStack)
method_45375(class_1657 arg0, class_1799 arg1)
equipHorseArmor(PlayerEntity player, ItemStack stack)
protected boolean
canDispenserEquipIntoSlot(EquipmentSlot slot)
method_63626(class_1304 arg0)
canDispenserEquipSlot(EquipmentSlot arg0)
public int
getTemper()
method_6729()
getTemper()
public void
setTemper(int temper)
method_6749(int arg0)
setTemper(int temper)
public int
modifyTemper(int amount)
method_6745(int arg0)
addTemper(int difference)
public boolean
isPushable()
method_5810()
isPushable()
private void
eating()
method_6733()
playEatingAnimation()
public boolean
causeFallDamage(double fallDistance, float damageModifier, DamageSource damageSource)
method_5747(double arg0, float arg1, class_1282 arg2)
handleFallDamage(double arg0, float arg1, DamageSource arg2)
public final int
getInventorySize()
method_6750()
getInventorySize()
protected void
createInventory()
method_6721()
onChestedStatusChanged()
protected RegistryEntry<SoundEvent>
getEquipSound(EquipmentSlot slot, ItemStack stack, Equippable equippable)
method_66667(class_1304 arg0, class_1799 arg1, class_10192 arg2)
getEquipSound(EquipmentSlot arg0, ItemStack arg1, EquippableComponent arg2)
public boolean
hurtServer(ServerLevel level, DamageSource source, float damage)
method_64397(class_3218 arg0, class_1282 arg1, float arg2)
damage(ServerWorld arg0, DamageSource arg1, float arg2)
protected boolean
canPerformRearing()
method_45349()
shouldAmbientStand()
protected SoundEvent
getEatingSound()
method_28368()
getEatSound()
protected SoundEvent
getAngrySound()
method_6747()
getAngrySound()
protected void
playStepSound(BlockPos pos, BlockState blockState)
method_5712(class_2338 arg0, class_2680 arg1)
playStepSound(BlockPos arg0, BlockState arg1)
private boolean
isWoodSoundType(SoundType soundType)
method_49996(class_2498 arg0)
isWooden(BlockSoundGroup soundGroup)
protected void
playGallopSound(SoundType soundType)
method_6761(class_2498 arg0)
playWalkSound(BlockSoundGroup group)
public static DefaultAttributeContainer$Builder
createBaseHorseAttributes()
method_26899()
createBaseHorseAttributes()
public int
getMaxSpawnClusterSize()
method_5945()
getLimitPerChunk()
public int
getMaxTemper()
method_6755()
getMaxTemper()
protected float
getSoundVolume()
method_6107()
getSoundVolume()
public int
getAmbientSoundInterval()
method_5970()
getMinAmbientSoundDelay()
public void
openCustomInventoryScreen(Player player)
method_6722(class_1657 arg0)
openInventory(PlayerEntity arg0)
public ActionResult
fedFood(Player player, ItemStack itemStack)
method_30009(class_1657 arg0, class_1799 arg1)
interactHorse(PlayerEntity player, ItemStack stack)
protected boolean
handleEating(Player player, ItemStack itemStack)
method_6742(class_1657 arg0, class_1799 arg1)
receiveFood(PlayerEntity player, ItemStack item)
protected void
doPlayerRide(Player player)
method_6726(class_1657 arg0)
putPlayerOnBack(PlayerEntity player)
public boolean
isImmobile()
method_6062()
isImmobile()
public boolean
isFood(ItemStack itemStack)
method_6481(class_1799 arg0)
isBreedingItem(ItemStack arg0)
private void
moveTail()
method_6759()
wagTail()
protected void
dropEquipment(ServerLevel level)
method_16078(class_3218 arg0)
dropInventory(ServerWorld arg0)
public void
aiStep()
method_6007()
tickMovement()
protected void
followMommy(ServerLevel level)
method_6746(class_3218 arg0)
walkToParent(ServerWorld world)
public boolean
canEatGrass()
method_6762()
eatsGrass()
public void
tick()
method_5773()
tick()
public ActionResult
mobInteract(Player player, InteractionHand hand)
method_5992(class_1657 arg0, class_1268 arg1)
interactMob(PlayerEntity arg0, Hand arg1)
private void
openMouth()
method_6738()
setEating()
public void
setEating(boolean flag)
method_6740(boolean arg0)
setEatingGrass(boolean eatingGrass)
public void
setStanding(int ticks)
method_6737(int arg0)
setAngry(int ticks)
public void
clearStanding()
method_71769()
setNotAngry()
public SoundEvent
getAmbientStandSound()
method_45376()
getAmbientStandSound()
public void
standIfPossible()
method_6748()
updateAnger()
public void
makeMad()
method_6757()
playAngrySound()
public boolean
tameWithName(Player player)
method_6752(class_1657 arg0)
bondWithPlayer(PlayerEntity player)
protected void
tickRidden(Player controller, Vec3 riddenInput)
method_49481(class_1657 arg0, class_243 arg1)
tickControlled(PlayerEntity arg0, Vec3d arg1)
protected Vec2f
getRiddenRotation(LivingEntity controller)
method_49489(class_1309 arg0)
getControlledRotation(LivingEntity controllingPassenger)
protected void
addPassenger(Entity passenger)
method_5627(class_1297 arg0)
addPassenger(Entity arg0)
protected Vec3d
getRiddenInput(Player controller, Vec3 selfInput)
method_49482(class_1657 arg0, class_243 arg1)
getControlledMovementInput(PlayerEntity arg0, Vec3d arg1)
protected float
getRiddenSpeed(Player controller)
method_49485(class_1657 arg0)
getSaddledSpeed(PlayerEntity arg0)
protected void
executeRidersJump(float amount, Vec3 input)
method_45343(float arg0, class_243 arg1)
jump(float strength, Vec3d movementInput)
protected void
playJumpSound()
method_6723()
playJumpSound()
protected void
addAdditionalSaveData(ValueOutput output)
method_5652(class_11372 arg0)
writeCustomData(WriteView arg0)
protected void
readAdditionalSaveData(ValueInput input)
method_5749(class_11368 arg0)
readCustomData(ReadView arg0)
public boolean
canMate(Animal partner)
method_6474(class_1429 arg0)
canBreedWith(AnimalEntity arg0)
protected boolean
canParent()
method_6734()
canBreed()
public boolean
isMobControlled()
method_75147()
isControlledByMob()
public PassiveEntity
getBreedOffspring(ServerLevel level, AgeableMob partner)
method_5613(class_3218 arg0, class_1296 arg1)
createChild(ServerWorld arg0, PassiveEntity arg1)
protected void
setOffspringAttributes(AgeableMob partner, AbstractHorse baby)
method_6743(class_1296 arg0, class_1496 arg1)
setChildAttributes(PassiveEntity other, AbstractHorseEntity child)
private void
setOffspringAttribute(AgeableMob partner, AbstractHorse baby, Holder<Attribute> attribute, double attributeRangeMin, double attributeRangeMax)
method_49124(class_1296 arg0, class_1496 arg1, class_6880<class_1320> arg2, double arg3, double arg4)
setChildAttribute(PassiveEntity other, AbstractHorseEntity child, RegistryEntry<EntityAttribute> attribute, double min, double max)
public static double
createOffspringAttribute(double parentAValue, double parentBValue, double attributeRangeMin, double attributeRangeMax, RandomSource random)
method_49123(double arg0, double arg1, double arg2, double arg3, class_5819 arg4)
calculateAttributeBaseValue(double parentBase, double otherParentBase, double min, double max, Random random)
public float
getEatAnim(float a)
method_6739(float arg0)
getEatingGrassAnimationProgress(float tickProgress)
public float
getStandAnim(float a)
method_6767(float arg0)
getAngryAnimationProgress(float tickProgress)
public float
getMouthAnim(float a)
method_6772(float arg0)
getEatingAnimationProgress(float tickProgress)
public void
onPlayerJump(int jumpAmount)
method_6154(int arg0)
setJumpStrength(int arg0)
public boolean
canJump()
method_6153()
canJump()
public void
handleStartJump(int jumpScale)
method_6155(int arg0)
startJumping(int arg0)
public void
handleStopJump()
method_6156()
stopJumping()
protected void
spawnTamingParticles(boolean success)
method_6760(boolean arg0)
spawnPlayerReactionParticles(boolean positive)
public void
handleEntityEvent(byte id)
method_5711(byte arg0)
handleStatus(byte arg0)
protected void
positionRider(Entity passenger, Entity$MoveFunction moveFunction)
method_5865(class_1297 arg0, class_1297$class_4738 arg1)
updatePassengerPosition(Entity arg0, Entity$PositionUpdater arg1)
protected static float
generateMaxHealth(IntUnaryOperator integerByBoundProvider)
method_6754(IntUnaryOperator arg0)
getChildHealthBonus(IntUnaryOperator randomIntGetter)
protected static double
generateJumpStrength(DoubleSupplier probabilityProvider)
method_6774(DoubleSupplier arg0)
getChildJumpStrengthBonus(DoubleSupplier randomDoubleGetter)
protected static double
generateSpeed(DoubleSupplier probabilityProvider)
method_6728(DoubleSupplier arg0)
getChildMovementSpeedBonus(DoubleSupplier randomDoubleGetter)
public boolean
onClimbable()
method_6101()
isClimbing()
public StackReference
getSlot(int slot)
method_32318(int arg0)
getStackReference(int arg0)
public LivingEntity
getControllingPassenger()
method_5642()
getControllingPassenger()
private Vec3d
getDismountLocationInDirection(Vec3 direction, LivingEntity passenger)
method_27930(class_243 arg0, class_1309 arg1)
locateSafeDismountingPos(Vec3d offset, LivingEntity passenger)
public Vec3d
getDismountLocationForPassenger(LivingEntity passenger)
method_24829(class_1309 arg0)
updatePassengerForDismount(LivingEntity arg0)
protected void
randomizeAttributes(RandomSource random)
method_6001(class_5819 arg0)
initAttributes(Random random)
public EntityData
finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData groupData)
method_5943(class_5425 arg0, class_1266 arg1, class_3730 arg2, class_1315 arg3)
initialize(ServerWorldAccess arg0, LocalDifficulty arg1, SpawnReason arg2, EntityData arg3)
public boolean
hasInventoryChanged(Container oldInventory)
method_33338(class_1263 arg0)
areInventoriesDifferent(Inventory inventory)
public int
getAmbientStandInterval()
method_45377()
getMinAmbientStandDelay()
protected Vec3d
getPassengerAttachmentPoint(Entity passenger, EntityDimensions dimensions, float scale)
method_52533(class_1297 arg0, class_4048 arg1, float arg2)
getPassengerAttachmentPos(Entity arg0, EntityDimensions arg1, float arg2)
public int
getInventoryColumns()
method_6702()
getInventoryColumns()
private static boolean
lambda$addBehaviourGoals$0(ItemStack arg0)
method_58392(class_1799 arg0)
method_58392(ItemStack stack)
private static boolean
lambda$static$6(LivingEntity arg0, ServerLevel arg1)
method_6741(class_1309 arg0, class_3218 arg1)
method_6741(LivingEntity entity, ServerWorld world)
private static int
lambda$static$5(int arg0)
method_49129(int arg0)
method_49129(int max)
private static int
lambda$static$4(int arg0)
method_49130(int arg0)
method_49130(int max)
private static double
lambda$static$3()
method_49125()
method_49125()
private static double
lambda$static$2()
method_49126()
method_49126()
private static double
lambda$static$1()
method_49127()
method_49127()
private static double
lambda$static$0()
method_49128()
method_49128()