类 Sheep

所有已实现的接口:
CommandSource, Attackable, Shearable, Targeting, EntityAccess, Nameable, ICapabilityProvider, ICapabilityProviderImpl<Entity>, ICapabilitySerializable<CompoundTag>, IForgeEntity, IForgeLivingEntity, IForgeShearable, INBTSerializable<CompoundTag>

public class Sheep extends Animal implements Shearable, IForgeShearable
  • 字段详细资料

    • EAT_ANIMATION_TICKS

      private static final int EAT_ANIMATION_TICKS
      另请参阅:
    • DATA_WOOL_ID

      private static final EntityDataAccessor<Byte> DATA_WOOL_ID
    • ITEM_BY_DYE

      private static final Map<DyeColor,ItemLike> ITEM_BY_DYE
    • COLORARRAY_BY_COLOR

      private static final Map<DyeColor,float[]> COLORARRAY_BY_COLOR
    • eatAnimationTick

      private int eatAnimationTick
    • eatBlockGoal

      private EatBlockGoal eatBlockGoal
  • 构造器详细资料

  • 方法详细资料

    • createSheepColor

      private static float[] createSheepColor(DyeColor p_29866_)
    • getColorArray

      public static float[] getColorArray(DyeColor pDyeColor)
    • registerGoals

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

      protected void customServerAiStep()
      覆盖:
      customServerAiStep 在类中 Animal
    • aiStep

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

      public static AttributeSupplier.Builder createAttributes()
    • defineSynchedData

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

      public ResourceLocation getDefaultLootTable()
      覆盖:
      getDefaultLootTable 在类中 Mob
    • handleEntityEvent

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

      public float getHeadEatPositionScale(float pPartialTick)
    • getHeadEatAngleScale

      public float getHeadEatAngleScale(float pPartialTick)
    • mobInteract

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

      public void shear(SoundSource pCategory)
      指定者:
      shear 在接口中 Shearable
    • readyForShearing

      public boolean readyForShearing()
      指定者:
      readyForShearing 在接口中 Shearable
    • addAdditionalSaveData

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

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

      protected SoundEvent getAmbientSound()
      覆盖:
      getAmbientSound 在类中 Mob
    • getHurtSound

      protected SoundEvent getHurtSound(DamageSource pDamageSource)
      覆盖:
      getHurtSound 在类中 LivingEntity
    • getDeathSound

      protected SoundEvent getDeathSound()
      覆盖:
      getDeathSound 在类中 LivingEntity
    • playStepSound

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

      public DyeColor getColor()
    • setColor

      public void setColor(DyeColor pDyeColor)
    • isSheared

      public boolean isSheared()
    • setSheared

      public void setSheared(boolean pSheared)
    • getRandomSheepColor

      public static DyeColor getRandomSheepColor(RandomSource pRandom)
    • getBreedOffspring

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

      public void ate()
      覆盖:
      ate 在类中 Mob
    • 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
    • getOffspringColor

      private DyeColor getOffspringColor(Animal pFather, Animal pMother)
    • makeContainer

      private static CraftingContainer makeContainer(DyeColor pFatherColor, DyeColor pMotherColor)
    • getStandingEyeHeight

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

      public boolean isShearable(@NotNull @NotNull ItemStack item, Level world, BlockPos pos)
      从接口复制的说明: IForgeShearable
      Checks if the object is currently shearable Example: Sheep return false when they have no wool
      指定者:
      isShearable 在接口中 IForgeShearable
      参数:
      item - The ItemStack that is being used, may be empty.
      world - The current level.
      pos - Block's position in level.
      返回:
      If this is shearable, and onSheared should be called.
    • onSheared

      @NotNull public List<ItemStack> onSheared(@Nullable Player player, @NotNull @NotNull ItemStack item, Level world, BlockPos pos, int fortune)
      从接口复制的说明: IForgeShearable
      Performs the shear function on this object. This is called for both client, and server. The object should perform all actions related to being sheared, except for dropping of the items, and removal of the block. As those are handled by ItemShears itself. Returns a list of items that resulted from the shearing process. For entities, they should trust there internal location information over the values passed into this function.
      指定者:
      onSheared 在接口中 IForgeShearable
      item - The ItemStack that is being used, may be empty.
      world - The current level.
      pos - If this is a block, the block's position in level.
      fortune - The fortune level of the shears being used.
      返回:
      A List containing all items from this shearing. May be empty.