类 AbstractHorse

所有已实现的接口:
CommandSource, ContainerListener, Attackable, HasCustomInventoryScreen, OwnableEntity, PlayerRideable, PlayerRideableJumping, Saddleable, Targeting, EntityAccess, Nameable, ICapabilityProvider, ICapabilityProviderImpl<Entity>, ICapabilitySerializable<CompoundTag>, IForgeEntity, IForgeLivingEntity, INBTSerializable<CompoundTag>
直接已知子类:
AbstractChestedHorse, Camel, Horse, SkeletonHorse, ZombieHorse

public abstract class AbstractHorse extends Animal implements ContainerListener, HasCustomInventoryScreen, OwnableEntity, PlayerRideableJumping, Saddleable
  • 字段详细资料

    • EQUIPMENT_SLOT_OFFSET

      public static final int EQUIPMENT_SLOT_OFFSET
      另请参阅:
    • CHEST_SLOT_OFFSET

      public static final int CHEST_SLOT_OFFSET
      另请参阅:
    • INVENTORY_SLOT_OFFSET

      public static final int INVENTORY_SLOT_OFFSET
      另请参阅:
    • BREEDING_CROSS_FACTOR

      public static final double BREEDING_CROSS_FACTOR
      另请参阅:
    • 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
      另请参阅:
    • SIDEWAYS_MOVE_SPEED_FACTOR

      private static final float SIDEWAYS_MOVE_SPEED_FACTOR
      另请参阅:
    • PARENT_HORSE_SELECTOR

      private static final Predicate<LivingEntity> PARENT_HORSE_SELECTOR
    • MOMMY_TARGETING

      private static final TargetingConditions MOMMY_TARGETING
    • FOOD_ITEMS

      private static final Ingredient FOOD_ITEMS
    • DATA_ID_FLAGS

      private static final EntityDataAccessor<Byte> DATA_ID_FLAGS
    • FLAG_TAME

      private static final int FLAG_TAME
      另请参阅:
    • FLAG_SADDLE

      private static final int FLAG_SADDLE
      另请参阅:
    • FLAG_BRED

      private static final int FLAG_BRED
      另请参阅:
    • FLAG_EATING

      private static final int FLAG_EATING
      另请参阅:
    • FLAG_STANDING

      private static final int FLAG_STANDING
      另请参阅:
    • FLAG_OPEN_MOUTH

      private static final int FLAG_OPEN_MOUTH
      另请参阅:
    • INV_SLOT_SADDLE

      public static final int INV_SLOT_SADDLE
      另请参阅:
    • INV_SLOT_ARMOR

      public static final int INV_SLOT_ARMOR
      另请参阅:
    • INV_BASE_COUNT

      public static final int INV_BASE_COUNT
      另请参阅:
    • eatingCounter

      private int eatingCounter
    • mouthCounter

      private int mouthCounter
    • standCounter

      private int standCounter
    • tailCounter

      public int tailCounter
    • sprintCounter

      public int sprintCounter
    • isJumping

      protected boolean isJumping
    • inventory

      protected SimpleContainer inventory
    • temper

      protected int temper
    • 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 gallopSoundCounter
    • owner

      @Nullable private UUID owner
    • itemHandler

      private LazyOptional<?> itemHandler
  • 构造器详细资料

  • 方法详细资料

    • registerGoals

      protected void registerGoals()
      覆盖:
      registerGoals 在类中 Mob
    • addBehaviourGoals

      protected void addBehaviourGoals()
    • defineSynchedData

      protected void defineSynchedData()
      覆盖:
      defineSynchedData 在类中 AgeableMob
    • getFlag

      protected boolean getFlag(int pFlagId)
    • setFlag

      protected void setFlag(int pFlagId, boolean pValue)
    • isTamed

      public boolean isTamed()
    • getOwnerUUID

      @Nullable public UUID getOwnerUUID()
      指定者:
      getOwnerUUID 在接口中 OwnableEntity
    • setOwnerUUID

      public void setOwnerUUID(@Nullable UUID pUuid)
    • isJumping

      public boolean isJumping()
    • setTamed

      public void setTamed(boolean pTamed)
    • setIsJumping

      public void setIsJumping(boolean pJumping)
    • onLeashDistance

      protected void onLeashDistance(float pDistance)
      覆盖:
      onLeashDistance 在类中 PathfinderMob
    • isEating

      public boolean isEating()
    • isStanding

      public boolean isStanding()
    • isBred

      public boolean isBred()
    • setBred

      public void setBred(boolean pBreeding)
    • isSaddleable

      public boolean isSaddleable()
      指定者:
      isSaddleable 在接口中 Saddleable
    • equipSaddle

      public void equipSaddle(@Nullable SoundSource pSource)
      指定者:
      equipSaddle 在接口中 Saddleable
    • equipArmor

      public void equipArmor(Player pPlayer, ItemStack pArmor)
    • isSaddled

      public boolean isSaddled()
      指定者:
      isSaddled 在接口中 Saddleable
    • getTemper

      public int getTemper()
    • setTemper

      public void setTemper(int pTemper)
    • modifyTemper

      public int modifyTemper(int pAddedTemper)
    • isPushable

      public boolean isPushable()
      覆盖:
      isPushable 在类中 LivingEntity
    • eating

      private void eating()
    • causeFallDamage

      public boolean causeFallDamage(float pFallDistance, float pMultiplier, DamageSource pSource)
      覆盖:
      causeFallDamage 在类中 LivingEntity
    • calculateFallDamage

      protected int calculateFallDamage(float pDistance, float pDamageMultiplier)
      覆盖:
      calculateFallDamage 在类中 LivingEntity
    • getInventorySize

      protected int getInventorySize()
    • createInventory

      protected void createInventory()
    • updateContainerEquipment

      protected void updateContainerEquipment()
    • containerChanged

      public void containerChanged(Container pInvBasic)
      指定者:
      containerChanged 在接口中 ContainerListener
    • getCustomJump

      public double getCustomJump()
    • hurt

      public boolean hurt(DamageSource pSource, float pAmount)
      覆盖:
      hurt 在类中 Animal
    • canPerformRearing

      protected boolean canPerformRearing()
    • getEatingSound

      @Nullable protected SoundEvent getEatingSound()
    • getAngrySound

      @Nullable protected SoundEvent getAngrySound()
    • playStepSound

      protected void playStepSound(BlockPos pPos, BlockState pBlock)
      覆盖:
      playStepSound 在类中 Entity
    • isWoodSoundType

      private boolean isWoodSoundType(SoundType pSoundType)
    • playGallopSound

      protected void playGallopSound(SoundType pSoundType)
    • createBaseHorseAttributes

      public static AttributeSupplier.Builder createBaseHorseAttributes()
    • getMaxSpawnClusterSize

      public int getMaxSpawnClusterSize()
      覆盖:
      getMaxSpawnClusterSize 在类中 Mob
    • getMaxTemper

      public int getMaxTemper()
    • getSoundVolume

      protected float getSoundVolume()
      覆盖:
      getSoundVolume 在类中 LivingEntity
    • getAmbientSoundInterval

      public int getAmbientSoundInterval()
      覆盖:
      getAmbientSoundInterval 在类中 Animal
    • openCustomInventoryScreen

      public void openCustomInventoryScreen(Player pPlayer)
      指定者:
      openCustomInventoryScreen 在接口中 HasCustomInventoryScreen
    • fedFood

      public InteractionResult fedFood(Player pPlayer, ItemStack pStack)
    • handleEating

      protected boolean handleEating(Player pPlayer, ItemStack pStack)
    • doPlayerRide

      protected void doPlayerRide(Player pPlayer)
    • isImmobile

      public boolean isImmobile()
      覆盖:
      isImmobile 在类中 LivingEntity
    • isFood

      public boolean isFood(ItemStack pStack)
      覆盖:
      isFood 在类中 Animal
    • moveTail

      private void moveTail()
    • dropEquipment

      protected void dropEquipment()
      覆盖:
      dropEquipment 在类中 LivingEntity
    • aiStep

      public void aiStep()
      覆盖:
      aiStep 在类中 Animal
    • followMommy

      protected void followMommy()
    • canEatGrass

      public boolean canEatGrass()
    • tick

      public void tick()
      覆盖:
      tick 在类中 Mob
    • mobInteract

      public InteractionResult mobInteract(Player pPlayer, InteractionHand pHand)
      覆盖:
      mobInteract 在类中 Animal
    • openMouth

      private void openMouth()
    • setEating

      public void setEating(boolean pEating)
    • setStanding

      public void setStanding(boolean pStanding)
    • getAmbientStandSound

      @Nullable public SoundEvent getAmbientStandSound()
    • standIfPossible

      public void standIfPossible()
    • makeMad

      public void makeMad()
    • tameWithName

      public boolean tameWithName(Player pPlayer)
    • tickRidden

      protected void tickRidden(Player pPlayer, Vec3 pTravelVector)
      覆盖:
      tickRidden 在类中 LivingEntity
    • getRiddenRotation

      protected Vec2 getRiddenRotation(LivingEntity pEntity)
    • getRiddenInput

      protected Vec3 getRiddenInput(Player pPlayer, Vec3 pTravelVector)
      覆盖:
      getRiddenInput 在类中 LivingEntity
    • getRiddenSpeed

      protected float getRiddenSpeed(Player pPlayer)
      覆盖:
      getRiddenSpeed 在类中 LivingEntity
    • executeRidersJump

      protected void executeRidersJump(float pPlayerJumpPendingScale, Vec3 pTravelVector)
    • playJumpSound

      protected void playJumpSound()
    • addAdditionalSaveData

      public void addAdditionalSaveData(CompoundTag pCompound)
      覆盖:
      addAdditionalSaveData 在类中 Animal
    • readAdditionalSaveData

      public void readAdditionalSaveData(CompoundTag pCompound)
      覆盖:
      readAdditionalSaveData 在类中 Animal
    • canMate

      public boolean canMate(Animal pOtherAnimal)
      覆盖:
      canMate 在类中 Animal
    • canParent

      protected boolean canParent()
    • getBreedOffspring

      @Nullable public AgeableMob getBreedOffspring(ServerLevel pLevel, AgeableMob pOtherParent)
      指定者:
      getBreedOffspring 在类中 AgeableMob
    • setOffspringAttributes

      protected void setOffspringAttributes(AgeableMob pParent, AbstractHorse pChild)
    • setOffspringAttribute

      private void setOffspringAttribute(AgeableMob pOtherParent, AbstractHorse pChild, 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)
      指定者:
      onPlayerJump 在接口中 PlayerRideableJumping
    • canJump

      public boolean canJump()
      指定者:
      canJump 在接口中 PlayerRideableJumping
    • handleStartJump

      public void handleStartJump(int pJumpPower)
      指定者:
      handleStartJump 在接口中 PlayerRideableJumping
    • handleStopJump

      public void handleStopJump()
      指定者:
      handleStopJump 在接口中 PlayerRideableJumping
    • spawnTamingParticles

      protected void spawnTamingParticles(boolean pTamed)
    • handleEntityEvent

      public void handleEntityEvent(byte pId)
      覆盖:
      handleEntityEvent 在类中 Animal
    • positionRider

      protected void positionRider(Entity pPassenger, Entity.MoveFunction pCallback)
      覆盖:
      positionRider 在类中 Entity
    • generateMaxHealth

      protected static float generateMaxHealth(IntUnaryOperator pOperator)
    • generateJumpStrength

      protected static double generateJumpStrength(DoubleSupplier pSupplier)
    • generateSpeed

      protected static double generateSpeed(DoubleSupplier pSupplier)
    • onClimbable

      public boolean onClimbable()
      覆盖:
      onClimbable 在类中 LivingEntity
    • getStandingEyeHeight

      protected float getStandingEyeHeight(Pose pPose, EntityDimensions pSize)
      覆盖:
      getStandingEyeHeight 在类中 LivingEntity
    • canWearArmor

      public boolean canWearArmor()
    • isWearingArmor

      public boolean isWearingArmor()
    • isArmor

      public boolean isArmor(ItemStack pStack)
    • createEquipmentSlotAccess

      private SlotAccess createEquipmentSlotAccess(int pSlot, Predicate<ItemStack> pStackFilter)
    • getSlot

      public SlotAccess getSlot(int pSlot)
      覆盖:
      getSlot 在类中 LivingEntity
    • getControllingPassenger

      @Nullable public LivingEntity getControllingPassenger()
      覆盖:
      getControllingPassenger 在类中 Mob
    • getDismountLocationInDirection

      @Nullable private Vec3 getDismountLocationInDirection(Vec3 pDirection, LivingEntity pPassenger)
    • getDismountLocationForPassenger

      public Vec3 getDismountLocationForPassenger(LivingEntity pLivingEntity)
      覆盖:
      getDismountLocationForPassenger 在类中 Entity
    • randomizeAttributes

      protected void randomizeAttributes(RandomSource pRandom)
    • finalizeSpawn

      @Nullable public SpawnGroupData finalizeSpawn(ServerLevelAccessor pLevel, DifficultyInstance pDifficulty, MobSpawnType pReason, @Nullable SpawnGroupData pSpawnData, @Nullable CompoundTag pDataTag)
      从类复制的说明: Mob
      Forge: Override-Only, call via ForgeEventFactory.onFinalizeSpawn.
      Overrides are allowed. Do not wrap super calls within override (as that will cause stack overflows).
      Vanilla calls are replaced with a transformer, and are not visible in source.

      Be certain to either call super.finalizeSpawn or set the Mob.spawnType field from within your override.

      覆盖:
      finalizeSpawn 在类中 AgeableMob
    • getCapability

      public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction facing)
      从接口复制的说明: ICapabilityProvider
      Retrieves the Optional handler for the capability requested on the specific side. The return value CAN be the same for multiple faces. Modders are encouraged to cache this value, using the listener capabilities of the Optional to be notified if the requested capability get lost.
      指定者:
      getCapability 在接口中 ICapabilityProvider
      覆盖:
      getCapability 在类中 LivingEntity
      参数:
      capability - The capability to check
      facing - The Side to check from, CAN BE NULL. Null is defined to represent 'internal' or 'self'
      返回:
      The requested an optional holding the requested capability.
    • invalidateCaps

      public void invalidateCaps()
      指定者:
      invalidateCaps 在接口中 ICapabilityProviderImpl<Entity>
      覆盖:
      invalidateCaps 在类中 LivingEntity
    • hasInventoryChanged

      public boolean hasInventoryChanged(Container pInventory)
    • getAmbientStandInterval

      public int getAmbientStandInterval()