类 AbstractHorse

所有已实现的接口:
SyncedDataHolder, ContainerListener, Attackable, EquipmentUser, HasCustomInventoryScreen, Leashable, OwnableEntity, PlayerRideable, PlayerRideableJumping, Saddleable, Targeting, EntityAccess, Nameable, ScoreHolder, 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 TargetingConditions.Selector PARENT_HORSE_SELECTOR
    • MOMMY_TARGETING

      private static final TargetingConditions MOMMY_TARGETING
    • 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_BASE_COUNT

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

      public static final int INVENTORY_ROWS
      另请参阅:
    • 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
    • bodyArmorAccess

      private final Container bodyArmorAccess
    • itemHandler

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

  • 方法详细资料

    • registerGoals

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

      protected void addBehaviourGoals()
    • defineSynchedData

      protected void defineSynchedData(SynchedEntityData.Builder p_334643_)
      覆盖:
      defineSynchedData 在类中 AgeableMob
    • getFlag

      protected boolean getFlag(int p_30648_)
    • setFlag

      protected void setFlag(int p_30598_, boolean p_30599_)
    • isTamed

      public boolean isTamed()
    • getOwnerUUID

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

      public void setOwnerUUID(@Nullable UUID p_30587_)
    • isJumping

      public boolean isJumping()
    • setTamed

      public void setTamed(boolean p_30652_)
    • setIsJumping

      public void setIsJumping(boolean p_30656_)
    • handleLeashAtDistance

      public boolean handleLeashAtDistance(Entity p_344799_, float p_342991_)
      指定者:
      handleLeashAtDistance 在接口中 Leashable
      覆盖:
      handleLeashAtDistance 在类中 PathfinderMob
    • isEating

      public boolean isEating()
    • isStanding

      public boolean isStanding()
    • isBred

      public boolean isBred()
    • setBred

      public void setBred(boolean p_30658_)
    • isSaddleable

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

      public void equipSaddle(ItemStack p_343290_, @Nullable SoundSource p_30546_)
      指定者:
      equipSaddle 在接口中 Saddleable
    • equipBodyArmor

      public void equipBodyArmor(Player p_335804_, ItemStack p_327797_)
    • canDispenserEquipIntoSlot

      protected boolean canDispenserEquipIntoSlot(EquipmentSlot p_363135_)
      覆盖:
      canDispenserEquipIntoSlot 在类中 Mob
    • isSaddled

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

      public int getTemper()
    • setTemper

      public void setTemper(int p_30650_)
    • modifyTemper

      public int modifyTemper(int p_30654_)
    • isPushable

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

      private void eating()
    • causeFallDamage

      public boolean causeFallDamage(float p_149499_, float p_149500_, DamageSource p_149501_)
      覆盖:
      causeFallDamage 在类中 LivingEntity
    • getInventorySize

      public final int getInventorySize()
    • getInventorySize

      public static int getInventorySize(int p_345108_)
    • createInventory

      protected void createInventory()
    • syncSaddleToClients

      protected void syncSaddleToClients()
    • containerChanged

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

      public boolean hurtServer(ServerLevel p_362456_, DamageSource p_368293_, float p_368244_)
      覆盖:
      hurtServer 在类中 LivingEntity
    • canPerformRearing

      protected boolean canPerformRearing()
    • getEatingSound

      @Nullable protected SoundEvent getEatingSound()
    • getAngrySound

      @Nullable protected SoundEvent getAngrySound()
    • playStepSound

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

      private boolean isWoodSoundType(SoundType p_278280_)
    • playGallopSound

      protected void playGallopSound(SoundType p_30560_)
    • 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 p_218808_)
      指定者:
      openCustomInventoryScreen 在接口中 HasCustomInventoryScreen
    • fedFood

      public InteractionResult fedFood(Player p_30581_, ItemStack p_30582_)
    • handleEating

      protected boolean handleEating(Player p_30593_, ItemStack p_30594_)
    • doPlayerRide

      protected void doPlayerRide(Player p_30634_)
    • isImmobile

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

      public boolean isFood(ItemStack p_30644_)
      指定者:
      isFood 在类中 Animal
    • moveTail

      private void moveTail()
    • dropEquipment

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

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

      protected void followMommy(ServerLevel p_369753_)
    • canEatGrass

      public boolean canEatGrass()
    • tick

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

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

      private void openMouth()
    • setEating

      public void setEating(boolean p_30662_)
    • setStanding

      public void setStanding(boolean p_30666_)
    • getAmbientStandSound

      @Nullable public SoundEvent getAmbientStandSound()
    • standIfPossible

      public void standIfPossible()
    • makeMad

      public void makeMad()
    • tameWithName

      public boolean tameWithName(Player p_30638_)
    • tickRidden

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

      protected Vec2 getRiddenRotation(LivingEntity p_275502_)
    • getRiddenInput

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

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

      protected void executeRidersJump(float p_248808_, Vec3 p_275435_)
    • playJumpSound

      protected void playJumpSound()
    • addAdditionalSaveData

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

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

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

      protected boolean canParent()
    • getBreedOffspring

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

      protected void setOffspringAttributes(AgeableMob p_149509_, AbstractHorse p_149510_)
    • setOffspringAttribute

      private void setOffspringAttribute(AgeableMob p_273163_, AbstractHorse p_273784_, Holder<Attribute> p_330057_, double p_272663_, double p_273405_)
    • createOffspringAttribute

      static double createOffspringAttribute(double p_272685_, double p_273709_, double p_273376_, double p_273030_, RandomSource p_272743_)
    • getEatAnim

      public float getEatAnim(float p_30664_)
    • getStandAnim

      public float getStandAnim(float p_30668_)
    • getMouthAnim

      public float getMouthAnim(float p_30534_)
    • onPlayerJump

      public void onPlayerJump(int p_30591_)
      指定者:
      onPlayerJump 在接口中 PlayerRideableJumping
    • canJump

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

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

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

      protected void spawnTamingParticles(boolean p_30670_)
    • handleEntityEvent

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

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

      protected static float generateMaxHealth(IntUnaryOperator p_272695_)
    • generateJumpStrength

      protected static double generateJumpStrength(DoubleSupplier p_272718_)
    • generateSpeed

      protected static double generateSpeed(DoubleSupplier p_273691_)
    • onClimbable

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

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

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

      @Nullable private Vec3 getDismountLocationInDirection(Vec3 p_30562_, LivingEntity p_30563_)
    • getDismountLocationForPassenger

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

      protected void randomizeAttributes(RandomSource p_218804_)
    • finalizeSpawn

      @Nullable public SpawnGroupData finalizeSpawn(ServerLevelAccessor p_30555_, DifficultyInstance p_30556_, EntitySpawnReason p_365113_, @Nullable SpawnGroupData p_30558_)
      从类复制的说明: 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.spawnReason field from within your override.

      覆盖:
      finalizeSpawn 在类中 AgeableMob
    • hasInventoryChanged

      public boolean hasInventoryChanged(Container p_149512_)
    • getAmbientStandInterval

      public int getAmbientStandInterval()
    • getPassengerAttachmentPoint

      protected Vec3 getPassengerAttachmentPoint(Entity p_301103_, EntityDimensions p_298879_, float p_299886_)
      覆盖:
      getPassengerAttachmentPoint 在类中 Entity
    • getBodyArmorAccess

      public final Container getBodyArmorAccess()
    • 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
    • getInventoryColumns

      public int getInventoryColumns()