Class AbstractHorse
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.entity.Entity
net.minecraft.world.entity.LivingEntity
net.minecraft.world.entity.Mob
net.minecraft.world.entity.PathfinderMob
net.minecraft.world.entity.AgeableMob
net.minecraft.world.entity.animal.Animal
net.minecraft.world.entity.animal.horse.AbstractHorse
- All Implemented Interfaces:
DataComponentGetter,SyncedDataHolder,DebugValueSource,Attackable,EquipmentUser,HasCustomInventoryScreen,ItemOwner,Leashable,OwnableEntity,PlayerRideable,PlayerRideableJumping,Targeting,EntityAccess,UniquelyIdentifyable,Nameable,ScoreHolder,Waypoint,WaypointTransmitter,IAttachmentHolder,IEntityExtension,ILivingEntityExtension
- Direct Known Subclasses:
AbstractChestedHorse,Camel,Horse,SkeletonHorse,ZombieHorse
public abstract class AbstractHorse
extends Animal
implements HasCustomInventoryScreen, OwnableEntity, PlayerRideableJumping
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.AgeableMob
AgeableMob.AgeableMobGroupDataNested classes/interfaces inherited from class net.minecraft.world.entity.LivingEntity
LivingEntity.FallsoundsNested classes/interfaces inherited from class net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.MovementEmission, Entity.RemovalReasonNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsFieldNested classes/interfaces inherited from interface net.minecraft.util.debug.DebugValueSource
DebugValueSource.Registration, DebugValueSource.ValueGetter<T>Nested classes/interfaces inherited from interface net.minecraft.world.entity.ItemOwner
ItemOwner.OffsetFromOwnerNested classes/interfaces inherited from interface net.minecraft.world.entity.Leashable
Leashable.LeashData, Leashable.WrenchNested classes/interfaces inherited from interface net.minecraft.world.waypoints.Waypoint
Waypoint.IconNested classes/interfaces inherited from interface net.minecraft.world.waypoints.WaypointTransmitter
WaypointTransmitter.BlockConnection, WaypointTransmitter.ChunkConnection, WaypointTransmitter.Connection, WaypointTransmitter.EntityAzimuthConnection, WaypointTransmitter.EntityBlockConnection, WaypointTransmitter.EntityChunkConnection -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprivate static final floatstatic final doubleprotected booleanstatic final intprivate static final EntityDataAccessor<Byte> private static final booleanprivate static final booleanprivate static final booleanprivate static final intprivate floatprivate floatprivate intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprotected intUsed to determine the sound that the horse should make when it stepsprotected SimpleContainerstatic final intstatic final intprivate static final floatprivate static final floatprivate static final floatprivate static final floatprivate static final floatprivate static final floatprivate static final TargetingConditionsprivate floatprivate floatprivate intprivate EntityReference<LivingEntity> private static final TargetingConditions.Selectorprotected floatprivate static final floatintprivate floatprivate floatprivate intintprotected intThe higher this value, the more likely the horse is to be tamed next time a player rides it.Fields inherited from class net.minecraft.world.entity.animal.Animal
PARENT_AGE_AFTER_BREEDINGFields inherited from class net.minecraft.world.entity.AgeableMob
age, BABY_START_AGE, DEFAULT_AGE, DEFAULT_FORCED_AGE, forcedAge, forcedAgeTimerFields inherited from class net.minecraft.world.entity.PathfinderMob
DEFAULT_WALK_TARGET_VALUEFields inherited from class net.minecraft.world.entity.Mob
ambientSoundTime, goalSelector, jumpControl, lookControl, MAX_ENCHANTED_ARMOR_CHANCE, MAX_ENCHANTED_WEAPON_CHANCE, MAX_PICKUP_LOOT_CHANCE, MAX_WEARING_ARMOR_CHANCE, moveControl, navigation, PICKUP_REACH, preventConversionSpawns, RANDOM_SPAWN_BONUS_ID, TAG_CAN_PICK_UP_LOOT, TAG_DROP_CHANCES, TAG_LEFT_HANDED, TAG_NO_AI, targetSelector, UPDATE_GOAL_SELECTOR_EVERY_N_TICKS, WEARING_ARMOR_UPGRADE_MATERIAL_ATTEMPTS, WEARING_ARMOR_UPGRADE_MATERIAL_CHANCE, xpRewardFields inherited from class net.minecraft.world.entity.LivingEntity
ARMOR_SLOT_OFFSET, attackAnim, attackStrengthTicker, autoSpinAttackDmg, autoSpinAttackItemStack, autoSpinAttackTicks, BASE_JUMP_POWER, BODY_ARMOR_OFFSET, brain, damageContainers, DATA_LIVING_ENTITY_FLAGS, dead, DEATH_DURATION, deathTime, DEFAULT_BABY_SCALE, DEFAULT_BASE_GRAVITY, elytraAnimationState, equipment, EQUIPMENT_SLOT_OFFSET, EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT, fallFlyTicks, hurtDuration, hurtTime, INPUT_FRICTION, interpolation, invulnerableDuration, jumping, lastHurt, lastHurtByPlayer, lastHurtByPlayerMemoryTime, lerpHeadSteps, lerpYHeadRot, LIVING_ENTITY_FLAG_IS_USING, LIVING_ENTITY_FLAG_OFF_HAND, LIVING_ENTITY_FLAG_SPIN_ATTACK, MIN_MOVEMENT_DISTANCE, noActionTime, oAttackAnim, PLAYER_HURT_EXPERIENCE_TIME, PLAYER_NOT_WEARING_DISGUISE_ITEM, PLAYER_NOT_WEARING_DISGUISE_ITEM_FOR_TARGET, removeArrowTime, removeStingerTime, SADDLE_OFFSET, SLEEPING_DIMENSIONS, SWING_DURATION, swinging, swingingArm, swingTime, TAG_ATTRIBUTES, TAG_BRAIN, TAG_DEATH_TIME, TAG_EQUIPMENT, TAG_FALL_FLYING, TAG_HEALTH, TAG_HURT_BY_TIMESTAMP, TAG_HURT_TIME, TAG_SLEEPING_POS, useItem, useItemRemaining, walkAnimation, xxa, yBodyRot, yBodyRotO, yHeadRot, yHeadRotO, yya, zzaFields inherited from class net.minecraft.world.entity.Entity
BASE_SAFE_FALL_DISTANCE, BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, CONTENTS_SLOT_INDEX, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5, DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0, ENTITY_COUNTER, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, forgeFluidTypeHeight, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, invulnerableTime, isInPowderSnow, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, MAX_MOVEMENTS_HANDELED_PER_TICK, minorHorizontalCollision, moveDist, noPhysics, portalProcess, random, stringUUID, stuckSpeedMultiplier, TAG_AIR, TAG_CUSTOM_NAME, TAG_DATA, TAG_FALL_DISTANCE, TAG_FIRE, TAG_GLOWING, TAG_ID, TAG_INVULNERABLE, TAG_MOTION, TAG_NO_GRAVITY, TAG_ON_GROUND, TAG_PASSENGERS, TAG_PORTAL_COOLDOWN, TAG_POS, TAG_ROTATION, TAG_SILENT, TAG_UUID, tickCount, TOTAL_AIR_SUPPLY, uuid, verticalCollision, verticalCollisionBelow, wasEyeInWater, wasInPowderSnow, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOldFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.world.entity.Leashable
AXIS_SPECIFIC_ELASTICITY, ENTITY_ATTACHMENT_POINT, LEASH_ELASTIC_DIST, LEASH_TAG, LEASH_TOO_FAR_DIST, LEASHER_ATTACHMENT_POINT, MAXIMUM_ALLOWED_LEASHED_DIST, SHARED_QUAD_ATTACHMENT_POINTS, SPRING_DAMPENING, STIFFNESS, TORSIONAL_ELASTICITYFields inherited from interface net.minecraft.world.scores.ScoreHolder
WILDCARD, WILDCARD_NAMEFields inherited from interface net.minecraft.world.waypoints.Waypoint
MAX_RANGE, WAYPOINT_TRANSMIT_RANGE_HIDE_MODIFIERFields inherited from interface net.minecraft.world.waypoints.WaypointTransmitter
REALLY_FAR_DISTANCE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractHorse(EntityType<? extends AbstractHorse> p_30531_, Level p_30532_) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAdditionalSaveData(ValueOutput p_421759_) protected voidprotected voidaddPassenger(Entity p_435310_) voidaiStep()protected booleancanDispenserEquipIntoSlot(EquipmentSlot p_371599_) booleanbooleancanJump()booleanReturnstrueif the mob is currently able to mate with the specified mob.protected booleanprotected booleanbooleancanUseSlot(EquipmentSlot p_397737_) booleancauseFallDamage(double p_397025_, float p_149499_, DamageSource p_149501_) voidstatic AttributeSupplier.Builderprotected void(package private) static doublecreateOffspringAttribute(double pValue1, double pValue2, double pMin, double pMax, RandomSource pRandom) protected voiddefineSynchedData(SynchedEntityData.Builder p_326254_) protected voiddoPlayerRide(Player pPlayer) protected voiddropEquipment(ServerLevel p_376591_) private voideating()voidequipBodyArmor(Player pPlayer, ItemStack pStack) protected voidexecuteRidersJump(float pPlayerJumpPendingScale, Vec3 pTravelVector) finalizeSpawn(ServerLevelAccessor p_30555_, DifficultyInstance p_30556_, EntitySpawnReason p_363523_, SpawnGroupData p_30558_) protected voidfollowMommy(ServerLevel pLevel) protected static doublegenerateJumpStrength(DoubleSupplier pSupplier) protected static floatgenerateMaxHealth(IntUnaryOperator pOperator) protected static doublegenerateSpeed(DoubleSupplier pSupplier) intintprotected SoundEventgetBreedOffspring(ServerLevel p_149506_, AgeableMob p_149507_) getDismountLocationForPassenger(LivingEntity pLivingEntity) private Vec3getDismountLocationInDirection(Vec3 pDirection, LivingEntity pPassenger) floatgetEatAnim(float pPartialTick) protected SoundEventprotected Holder<SoundEvent> getEquipSound(EquipmentSlot p_397157_, ItemStack p_397978_, Equippable p_397221_) protected booleangetFlag(int pFlagId) intfinal intstatic intgetInventorySize(int pColumns) intintfloatgetMouthAnim(float pPartialTick) protected Vec3getPassengerAttachmentPoint(Entity p_295612_, EntityDimensions p_296023_, float p_295509_) Vec3[]protected Vec3getRiddenInput(Player p_278278_, Vec3 p_275506_) protected Vec2getRiddenRotation(LivingEntity pEntity) protected floatgetRiddenSpeed(Player p_278336_) getSlot(int p_149514_) protected floatfloatgetStandAnim(float pPartialTick) intprotected booleanhandleEating(Player pPlayer, ItemStack pStack) voidhandleEntityEvent(byte p_30541_) Handler forinvalid reference
World#setEntityStatevoidhandleStartJump(int pJumpPower) voidbooleanhasInventoryChanged(Container pInventory) booleanhurtServer(ServerLevel p_376833_, DamageSource p_376090_, float p_376270_) booleanisBred()booleanisEating()booleanChecks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)booleanbooleanbooleanbooleanisTamed()private booleanisWoodSoundType(SoundType pSoundType) voidmakeMad()mobInteract(Player p_252289_, InteractionHand p_248927_) intmodifyTemper(int pAddedTemper) private voidmoveTail()booleanvoidvoidonPlayerJump(int pJumpPower) voidopenCustomInventoryScreen(Player p_218808_) private voidprotected voidplayGallopSound(SoundType pSoundType) protected voidprotected voidplayStepSound(BlockPos pPos, BlockState pBlock) protected voidpositionRider(Entity p_289569_, Entity.MoveFunction p_289558_) protected voidrandomizeAttributes(RandomSource pRandom) protected voidreadAdditionalSaveData(ValueInput p_422316_) protected voidvoidsetBred(boolean pBreeding) voidsetEating(boolean pEating) protected voidsetFlag(int pFlagId, boolean pValue) private voidsetOffspringAttribute(AgeableMob pParent, AbstractHorse pChild, Holder<Attribute> pAttribute, double pMin, double pMax) protected voidsetOffspringAttributes(AgeableMob pParent, AbstractHorse pChild) voidsetOwner(LivingEntity pOwner) voidsetStanding(int pStandCounter) voidsetTamed(boolean pTamed) voidsetTemper(int pTemper) protected voidspawnTamingParticles(boolean pTamed) Spawns particles for the horse entity.voidbooleanbooleantameWithName(Player pPlayer) voidtick()protected voidtickRidden(Player p_278233_, Vec3 p_275693_) Methods inherited from class net.minecraft.world.entity.animal.Animal
actuallyHurt, canFallInLove, checkAnimalSpawnRules, createAnimalAttributes, customServerAiStep, finalizeSpawnChildFromBreeding, getBaseExperienceReward, getInLoveTime, getLoveCause, getWalkTargetValue, isBrightEnoughToSpawn, isInLove, playEatingSound, removeWhenFarAway, resetLove, setInLove, setInLoveTime, spawnChildFromBreedingMethods inherited from class net.minecraft.world.entity.AgeableMob
ageBoundaryReached, ageUp, ageUp, canBreed, getAge, getForcedAge, getForcedAgeTimer, getSpeedUpSecondsWhenFeeding, isBaby, onSyncedDataUpdated, setAge, setBabyMethods inherited from class net.minecraft.world.entity.PathfinderMob
checkSpawnRules, closeRangeLeashBehaviour, followLeashSpeed, getWalkTargetValue, isPanicking, isPathFinding, shouldStayCloseToLeashHolder, whenLeashedToMethods inherited from class net.minecraft.world.entity.Mob
ate, baseTick, canAttackType, canBeLeashed, canFireProjectileWeapon, canHoldItem, canPickUpLoot, canReplaceCurrentItem, canReplaceEqualItem, canShearEquipment, checkDespawn, checkMobSpawnRules, checkSpawnObstruction, clampHeadRotationToBody, clearHome, convertTo, convertTo, createBodyControl, createEquipmentSlotContainer, createMobAttributes, createNavigation, doHurtTarget, dropCustomDeathLoot, dropFromLootTable, dropPreservedEquipment, dropPreservedEquipment, enchantSpawnedArmor, enchantSpawnedWeapon, equip, equip, equipItemIfPossible, getAmbientSound, getAttackBoundingBox, getBodyArmorItem, getDropChances, getEquipmentForSlot, getHeadRotSpeed, getHomePosition, getHomeRadius, getJumpControl, getLeashData, getLookControl, getLootTable, getLootTableSeed, getMainArm, getMaxFallDistance, getMaxHeadXRot, getMaxHeadYRot, getMoveControl, getNavigation, getPathfindingMalus, getPickResult, getPickupReach, getPreferredWeaponType, getSensing, getSpawnType, getTarget, getTargetFromBrain, hasHome, interact, isAggressive, isEffectiveAi, isLeftHanded, isMaxGroupSizeReached, isNoAi, isPersistenceRequired, isSaddled, isSpawnCancelled, isSunBurnTick, isWearingBodyArmor, isWithinHome, isWithinHome, isWithinHome, isWithinMeleeAttackRange, jumpInFluid, jumpInLiquid, leashTooFarBehaviour, lookAt, onAttributeUpdated, onLeashRemoved, onOffspringSpawnedFromEgg, onPathfindingDone, onPathfindingStart, pickUpItem, playAmbientSound, playAttackSound, playHurtSound, populateDefaultEquipmentEnchantments, populateDefaultEquipmentSlots, registerDebugValues, removeAfterChangingDimensions, removeAllGoals, removeFreeWill, requiresCustomPersistence, serverAiStep, setAggressive, setBodyArmorItem, setCanPickUpLoot, setDropChance, setGuaranteedDrop, setHomeTo, setItemSlotAndDropWhenKilled, setLeashData, setLeftHanded, setNoAi, setPathfindingMalus, setPersistenceRequired, setSpawnCancelled, setSpeed, setTarget, setXxa, setYya, setZza, shouldPassengersInheritMalus, spawnAnim, startRiding, stopInPlace, tickHeadTurn, updateControlFlags, usePlayerItem, wantsToPickUpMethods inherited from class net.minecraft.world.entity.LivingEntity
activeLocationDependentEnchantments, addEffect, addEffect, animateHurt, applyInput, applyItemBlocking, areAllEffectsAmbient, asLivingEntity, attackable, blockedByItem, blockUsingItem, brainProvider, calculateEntityAnimation, calculateFallDamage, canAttack, canBeAffected, canBeSeenAsEnemy, canBeSeenByAnyone, canBreatheUnderwater, canEquipWithDispenser, canFreeze, canGlide, canGlideUsing, canStandOnFluid, canUsePortal, checkAutoSpinAttack, checkFallDamage, clearSleepingPos, completeUsingItem, createEquipment, createLivingAttributes, createWitherRose, decreaseAirSupply, die, doAutoAttackOnTouch, doesEmitEquipEvent, doHurtEquipment, doPush, drop, dropAllDeathLoot, dropExperience, dropFromEntityInteractLootTable, dropFromGiftLootTable, dropFromLootTable, dropFromLootTable, dropFromLootTable, dropFromShearingLootTable, equipmentHasChanged, forceAddEffect, getAbsorptionAmount, getActiveEffects, getActiveEffectsMap, getAgeScale, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributes, getAttributeValue, getBedOrientation, getBlockSpeedFactor, getBrain, getCombatTracker, getComfortableFallDistance, getCurrentSwingDuration, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDeathSound, getDefaultDimensions, getDefaultGravity, getDimensions, getDismountPoses, getEffect, getEffectBlendFactor, getEffectiveGravity, getEquipmentSlotForItem, getExperienceReward, getFallFlyingTicks, getFallSounds, getFluidFallingAdjustedMovement, getFlyingSpeed, getHealth, getHitbox, getHurtDir, getHurtSound, getInterpolation, getItemBlockingWith, getItemBySlot, getItemHeldByArm, getItemInHand, getJumpBoostPower, getJumpPower, getJumpPower, getKillCredit, getKnockback, getLastAttacker, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtByPlayer, getLastHurtByPlayerMemoryTime, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getLuck, getMainHandItem, getMaxAbsorption, getMaxHeadRotationRelativeToBody, getMaxHealth, getNoActionTime, getOffhandItem, getPassengerRidingPosition, getPreciseBodyRotation, getProjectile, getRelativePortalPosition, getScale, getSecondsToDisableBlocking, getSleepingPos, getSpeed, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVisualRotationYInDegrees, getVoicePitch, getWaterSlowDown, getWeaponItem, getYHeadRot, goDownInWater, handleDamageEvent, handleExtraItemsCreatedOnUse, hasEffect, hasInfiniteMaterials, hasItemInSlot, hasLandedInLiquid, hasLineOfSight, hasLineOfSight, heal, hurtArmor, hurtHelmet, igniteForTicks, increaseAirSupply, indicateDamage, internalSetAbsorptionAmount, isAffectedByFluids, isAffectedByPotions, isAlive, isAlwaysExperienceDropper, isAutoSpinAttack, isBlocking, isCurrentlyGlowing, isDeadOrDying, isEquippableInSlot, isFallFlying, isHolding, isHolding, isInvertedHealAndHarm, isInvulnerableTo, isInWall, isJumping, isLookingAtMe, isPickable, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isTransmittingWaypoint, isUsingItem, isVisuallySwimming, jumpFromGround, kill, knockback, lerpHeadRotationStep, lerpHeadTo, lookAt, makeBrain, makePoofParticles, makeSound, makeWaypointConnectionWith, maxUpStep, onBelowWorld, onChangedBlock, onEffectAdded, onEffectsRemoved, onEffectUpdated, onEnterCombat, onEquipItem, onEquippedItemBroken, onItemPickup, onLeaveCombat, onRemoval, playBlockFallSound, push, pushEntities, randomTeleport, recreateFromPacket, releaseUsingItem, remove, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeFrost, resetForwardDirectionOfRelativePortalPosition, resolveMobResponsibleForDamage, resolvePlayerResponsibleForDamage, rideTick, sanitizeScale, sendEffectToPassengers, setAbsorptionAmount, setArrowCount, setDiscardFriction, setHealth, setItemInHand, setItemSlot, setItemSlot, setJumping, setLastHurtByMob, setLastHurtByPlayer, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setRecordPlayingNearby, setSleepingPos, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDiscardFriction, shouldDropExperience, shouldDropLoot, shouldShowName, shouldTakeDrowningDamage, skipDropExperience, spawnItemParticles, startSleeping, startUsingItem, stopFallFlying, stopRiding, stopSleeping, stopUsingItem, swing, swing, take, tickDeath, tickEffects, travel, travelFlying, travelFlying, triggerOnDeathMobEffects, tryAddFrost, updateEffectVisibility, updateFallFlying, updateInvisibilityStatus, updateSwingTime, updateUsingItem, updateWalkAnimation, wasExperienceConsumed, waypointIcon, wouldNotSuffocateAtTargetPoseMethods inherited from class net.minecraft.world.entity.Entity
absSnapRotationTo, absSnapTo, absSnapTo, addDeltaMovement, addTag, adjustSpawnLocation, applyComponentsFromItemStack, applyEffectsFromBlocks, applyEffectsFromBlocks, applyGravity, applyImplicitComponent, applyImplicitComponentIfPresent, applyImplicitComponents, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canCollideWith, canControlVehicle, canInteractWithLevel, canRide, canSimulateMovement, canSpawnSprintParticle, canSprint, canTeleport, canTrample, captureDrops, captureDrops, castComponentValue, checkBelowWorld, checkFallDistanceAccumulation, checkSupportingBlock, chunkPosition, clearFire, clearFreeze, clearMovementThisTick, closerThan, closerThan, collectAllColliders, collideBoundingBox, collidedWithFluid, collidedWithShapeMovingFrom, considersEntityAsAlly, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStackForNameResolution, createHoverEvent, damageSources, dampensVibrations, deflection, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doCheckFallDamage, doWaterSplashEffect, dropAllLeashConnections, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, fireImmune, fixupDimensions, forceSetRotation, fudgePositionAfterSizeChange, gameEvent, gameEvent, get, getAddEntityPacket, getAirSupply, getAttachments, getAvailableSpaceBelow, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getCapability, getCapability, getCollisionHorizontalEscapeVector, getControlledVehicle, getCustomName, getDefaultPassengerAttachmentPoint, getDeltaMovement, getDimensionChangingDelay, getDirection, getDisplayName, getEncodeId, getEntityData, getEyeHeight, getEyeHeight, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getGravity, getHandHoldingItemAngle, getId, getInBlockState, getIndirectPassengers, getInputVector, getKnownMovement, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxHeightFluidType, getMotionDirection, getMovementEmission, getName, getNearestViewDirection, getOnPos, getOnPos, getOnPosLegacy, getPassengers, getPassengersAndSelf, getPercentFrozen, getPersistentData, getPickRadius, getPistonPushReaction, getPortalCooldown, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, getQuadLeashHolderOffsets, getRandom, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRemovalReason, getRequiresPrecisePosition, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getVehicleAttachmentPoint, getViewScale, getViewVector, getViewXRot, getX, getX, getXRot, getXRot, getY, getY, getYRot, getYRot, getZ, getZ, handleOnAboveBubbleColumn, handleOnInsideBubbleColumn, handlePortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPose, hurt, hurtClient, hurtOrSimulate, igniteForSeconds, ignoreExplosion, interactAt, is, isAddedToLevel, isAffectedByBlocks, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isClientAuthoritative, isColliding, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFlapping, isFlyingVehicle, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInClouds, isInFluidType, isInFluidType, isInLava, isInLiquid, isInShallowWater, isInterpolating, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableToBase, isInWater, isInWaterOrRain, isLocalClientAuthoritative, isLocalInstanceAuthoritative, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, killedEntity, lavaHurt, lavaIgnite, lerpMotion, lerpPositionAndRotationStep, level, limitPistonMovement, load, makeBoundingBox, makeBoundingBox, makeStuckInBlock, markHurt, maybeBackOffFromEdge, mayInteract, mirror, move, moveOrInterpolateTo, moveOrInterpolateTo, moveOrInterpolateTo, moveOrInterpolateTo, moveRelative, moveTowardsClosestSpace, nextStep, notifyLeasheeRemoved, notifyLeashHolder, oldPosition, onAboveBubbleColumn, onAddedToLevel, onClientRemoval, onExplosionHit, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onPassengerTurned, onRemovedFromLevel, onSyncedDataUpdated, pick, placePortalTicket, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playSwimSound, position, positionRider, problemPath, processFlappingMovement, processPortalCooldown, propagateFallToPassengers, push, push, reapplyPosition, refreshDimensions, registryAccess, removeLatestMovementRecording, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, sendBubbleColumnParticles, setAirSupply, setAsInsidePortal, setBoundingBox, setComponent, setCustomName, setCustomNameVisible, setData, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setNoGravity, setOldPos, setOldPosAndRot, setOldPosAndRot, setOldRot, setOnGround, setOnGroundWithMovement, setOnGroundWithMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRequiresPrecisePosition, setRot, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYRot, shearOffAllLeashConnections, shouldBeSaved, shouldBlockExplode, shouldPlayLavaHurtSound, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, snapTo, snapTo, snapTo, snapTo, snapTo, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startSeenByPlayer, stopSeenByPlayer, supportQuadLeashAsHolder, syncData, syncPacketPositionCodec, teleport, teleportRelative, teleportSetPosition, teleportSetPosition, teleportSpectators, teleportTo, teleportTo, thunderHit, toString, touchingUnloadedChunk, trackingPosition, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoCanPushEntityFluidPushing, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming, waterSwimSoundMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, removeData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.core.component.DataComponentGetter
get, getOrDefault, getOrDefault, getTyped, has, hasMethods inherited from interface net.minecraft.world.entity.EquipmentUser
equip, equip, equip, getItemBySlot, resolveSlot, setItemSlotMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IEntityExtension
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canTrample, captureDrops, captureDrops, copyAttachmentsFrom, getClassification, getEyeInFluidType, getFluidFallDistanceModifier, getFluidMotionScale, getFluidTypeHeight, getMaxHeightFluidType, getParts, getPersistentData, getSoundFromFluidType, hasCustomOutlineRendering, isAddedToLevel, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, onAddedToLevel, onRemovedFromLevel, revive, sendPairingData, shouldRiderSitMethods inherited from interface net.neoforged.neoforge.common.extensions.ILivingEntityExtension
canDrownInFluidType, canSwimInFluidType, moveInFluid, onDamageTaken, self, sinkInFluidMethods inherited from interface net.minecraft.world.entity.Leashable
canHaveALeashAttachedTo, checkElasticInteractions, dropLeash, getLeashHolder, getLeashOffset, getLeashOffset, isLeashed, leashDistanceTo, leashElasticDistance, leashSnapDistance, mayBeLeashed, readLeashData, removeLeash, setDelayedLeashHolderId, setLeashedTo, writeLeashDataMethods inherited from interface net.minecraft.world.Nameable
getPlainTextNameMethods inherited from interface net.minecraft.world.entity.OwnableEntity
getOwner, getRootOwner, levelMethods inherited from interface net.minecraft.world.entity.PlayerRideableJumping
getJumpCooldownMethods inherited from interface net.minecraft.world.scores.ScoreHolder
getFeedbackDisplayName
-
Field Details
-
CHEST_SLOT_OFFSET
public static final int CHEST_SLOT_OFFSET- See Also:
-
INVENTORY_SLOT_OFFSET
public static final int INVENTORY_SLOT_OFFSET- See Also:
-
BREEDING_CROSS_FACTOR
public static final double BREEDING_CROSS_FACTOR- See Also:
-
MIN_MOVEMENT_SPEED
private static final float MIN_MOVEMENT_SPEED -
MAX_MOVEMENT_SPEED
private static final float MAX_MOVEMENT_SPEED -
MIN_JUMP_STRENGTH
private static final float MIN_JUMP_STRENGTH -
MAX_JUMP_STRENGTH
private static final float MAX_JUMP_STRENGTH -
MIN_HEALTH
private static final float MIN_HEALTH -
MAX_HEALTH
private static final float MAX_HEALTH -
BACKWARDS_MOVE_SPEED_FACTOR
private static final float BACKWARDS_MOVE_SPEED_FACTOR- See Also:
-
SIDEWAYS_MOVE_SPEED_FACTOR
private static final float SIDEWAYS_MOVE_SPEED_FACTOR- See Also:
-
PARENT_HORSE_SELECTOR
-
MOMMY_TARGETING
-
DATA_ID_FLAGS
-
FLAG_TAME
private static final int FLAG_TAME- See Also:
-
FLAG_BRED
private static final int FLAG_BRED- See Also:
-
FLAG_EATING
private static final int FLAG_EATING- See Also:
-
FLAG_STANDING
private static final int FLAG_STANDING- See Also:
-
FLAG_OPEN_MOUTH
private static final int FLAG_OPEN_MOUTH- See Also:
-
INVENTORY_ROWS
public static final int INVENTORY_ROWS- See Also:
-
DEFAULT_TEMPER
private static final int DEFAULT_TEMPER- See Also:
-
DEFAULT_EATING_HAYSTACK
private static final boolean DEFAULT_EATING_HAYSTACK- See Also:
-
DEFAULT_BRED
private static final boolean DEFAULT_BRED- See Also:
-
DEFAULT_TAME
private static final boolean DEFAULT_TAME- See Also:
-
eatingCounter
private int eatingCounter -
mouthCounter
private int mouthCounter -
standCounter
private int standCounter -
tailCounter
public int tailCounter -
sprintCounter
public int sprintCounter -
inventory
-
temper
protected int temperThe higher this value, the more likely the horse is to be tamed next time a player rides it. -
playerJumpPendingScale
protected float playerJumpPendingScale -
allowStandSliding
protected boolean allowStandSliding -
eatAnim
private float eatAnim -
eatAnimO
private float eatAnimO -
standAnim
private float standAnim -
standAnimO
private float standAnimO -
mouthAnim
private float mouthAnim -
mouthAnimO
private float mouthAnimO -
canGallop
protected boolean canGallop -
gallopSoundCounter
protected int gallopSoundCounterUsed to determine the sound that the horse should make when it steps -
owner
-
-
Constructor Details
-
AbstractHorse
-
-
Method Details
-
registerGoals
protected void registerGoals()- Overrides:
registerGoalsin classMob
-
addBehaviourGoals
protected void addBehaviourGoals() -
defineSynchedData
- Overrides:
defineSynchedDatain classAgeableMob
-
getFlag
protected boolean getFlag(int pFlagId) -
setFlag
protected void setFlag(int pFlagId, boolean pValue) -
isTamed
public boolean isTamed() -
getOwnerReference
- Specified by:
getOwnerReferencein interfaceOwnableEntity
-
setOwner
-
setTamed
public void setTamed(boolean pTamed) -
onElasticLeashPull
public void onElasticLeashPull()- Specified by:
onElasticLeashPullin interfaceLeashable
-
supportQuadLeash
public boolean supportQuadLeash()- Specified by:
supportQuadLeashin interfaceLeashable
-
getQuadLeashOffsets
- Specified by:
getQuadLeashOffsetsin interfaceLeashable
-
isEating
public boolean isEating() -
isStanding
public boolean isStanding() -
isBred
public boolean isBred() -
setBred
public void setBred(boolean pBreeding) -
canUseSlot
- Overrides:
canUseSlotin classLivingEntity
-
equipBodyArmor
-
canDispenserEquipIntoSlot
- Overrides:
canDispenserEquipIntoSlotin classMob
-
getTemper
public int getTemper() -
setTemper
public void setTemper(int pTemper) -
modifyTemper
public int modifyTemper(int pAddedTemper) -
isPushable
public boolean isPushable()- Overrides:
isPushablein classLivingEntity
-
eating
private void eating() -
causeFallDamage
- Overrides:
causeFallDamagein classLivingEntity
-
getInventorySize
public final int getInventorySize() -
getInventorySize
public static int getInventorySize(int pColumns) -
createInventory
protected void createInventory() -
getEquipSound
protected Holder<SoundEvent> getEquipSound(EquipmentSlot p_397157_, ItemStack p_397978_, Equippable p_397221_) - Overrides:
getEquipSoundin classLivingEntity
-
hurtServer
- Overrides:
hurtServerin classLivingEntity
-
canPerformRearing
protected boolean canPerformRearing() -
getEatingSound
-
getAngrySound
-
playStepSound
- Overrides:
playStepSoundin classEntity
-
isWoodSoundType
-
playGallopSound
-
createBaseHorseAttributes
-
getMaxSpawnClusterSize
public int getMaxSpawnClusterSize()- Overrides:
getMaxSpawnClusterSizein classMob
-
getMaxTemper
public int getMaxTemper() -
getSoundVolume
protected float getSoundVolume()- Overrides:
getSoundVolumein classLivingEntity
-
getAmbientSoundInterval
public int getAmbientSoundInterval()- Overrides:
getAmbientSoundIntervalin classAnimal
-
openCustomInventoryScreen
- Specified by:
openCustomInventoryScreenin interfaceHasCustomInventoryScreen
-
fedFood
-
handleEating
-
doPlayerRide
-
isImmobile
public boolean isImmobile()- Overrides:
isImmobilein classLivingEntity
-
isFood
Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type) -
moveTail
private void moveTail() -
dropEquipment
- Overrides:
dropEquipmentin classLivingEntity
-
aiStep
public void aiStep() -
followMommy
-
canEatGrass
public boolean canEatGrass() -
tick
public void tick() -
mobInteract
- Overrides:
mobInteractin classAnimal
-
openMouth
private void openMouth() -
setEating
public void setEating(boolean pEating) -
setStanding
public void setStanding(int pStandCounter) -
clearStanding
public void clearStanding() -
getAmbientStandSound
-
standIfPossible
public void standIfPossible() -
makeMad
public void makeMad() -
tameWithName
-
tickRidden
- Overrides:
tickRiddenin classLivingEntity
-
getRiddenRotation
-
addPassenger
- Overrides:
addPassengerin classEntity
-
getRiddenInput
- Overrides:
getRiddenInputin classLivingEntity
-
getRiddenSpeed
- Overrides:
getRiddenSpeedin classLivingEntity
-
executeRidersJump
-
playJumpSound
protected void playJumpSound() -
addAdditionalSaveData
- Overrides:
addAdditionalSaveDatain classAnimal
-
readAdditionalSaveData
- Overrides:
readAdditionalSaveDatain classAnimal
-
canMate
Returnstrueif the mob is currently able to mate with the specified mob. -
canParent
protected boolean canParent() -
getBreedOffspring
- Specified by:
getBreedOffspringin classAgeableMob
-
setOffspringAttributes
-
setOffspringAttribute
private void setOffspringAttribute(AgeableMob pParent, AbstractHorse pChild, Holder<Attribute> pAttribute, double pMin, double pMax) -
createOffspringAttribute
static double createOffspringAttribute(double pValue1, double pValue2, double pMin, double pMax, RandomSource pRandom) -
getEatAnim
public float getEatAnim(float pPartialTick) -
getStandAnim
public float getStandAnim(float pPartialTick) -
getMouthAnim
public float getMouthAnim(float pPartialTick) -
onPlayerJump
public void onPlayerJump(int pJumpPower) - Specified by:
onPlayerJumpin interfacePlayerRideableJumping
-
canJump
public boolean canJump()- Specified by:
canJumpin interfacePlayerRideableJumping
-
handleStartJump
public void handleStartJump(int pJumpPower) - Specified by:
handleStartJumpin interfacePlayerRideableJumping
-
handleStopJump
public void handleStopJump()- Specified by:
handleStopJumpin interfacePlayerRideableJumping
-
spawnTamingParticles
protected void spawnTamingParticles(boolean pTamed) Spawns particles for the horse entity.- Parameters:
pTamed- whether to spawn hearts or smoke.
-
handleEntityEvent
public void handleEntityEvent(byte p_30541_) Description copied from class:LivingEntityHandler forinvalid reference
World#setEntityState- Overrides:
handleEntityEventin classAnimal
-
positionRider
- Overrides:
positionRiderin classEntity
-
generateMaxHealth
-
generateJumpStrength
-
generateSpeed
-
onClimbable
public boolean onClimbable()- Overrides:
onClimbablein classLivingEntity
-
getSlot
- Overrides:
getSlotin classLivingEntity
-
getControllingPassenger
- Overrides:
getControllingPassengerin classMob
-
getDismountLocationInDirection
-
getDismountLocationForPassenger
- Overrides:
getDismountLocationForPassengerin classEntity
-
randomizeAttributes
-
finalizeSpawn
@Nullable public SpawnGroupData finalizeSpawn(ServerLevelAccessor p_30555_, DifficultyInstance p_30556_, EntitySpawnReason p_363523_, @Nullable SpawnGroupData p_30558_) - Overrides:
finalizeSpawnin classAgeableMob
-
getInventory
-
hasInventoryChanged
-
getAmbientStandInterval
public int getAmbientStandInterval() -
getPassengerAttachmentPoint
protected Vec3 getPassengerAttachmentPoint(Entity p_295612_, EntityDimensions p_296023_, float p_295509_) - Overrides:
getPassengerAttachmentPointin classEntity
-
getInventoryColumns
public int getInventoryColumns()
-