Class EntityCat

All Implemented Interfaces:
EntityControlUtils, LogicalUtils, EntityAgeable, EntityAsyncPrepare, EntityCanAttack, EntityCanSit, EntityComponent, EntityDamageable, EntityHealable, EntityNameable, EntityOwnable, EntityTamable, EntityWalkable, Metadatable, Cloneable

  • Field Details

    • NETWORK_ID

      public static final int NETWORK_ID
      See Also:
    • diffHandDamage

      protected float[] diffHandDamage
  • Constructor Details

  • Method Details

    • getNetworkId

      public int getNetworkId()
      Description copied from class: Entity
      获得该实体的网络ID

      Get the network ID of the entity

      Specified by:
      getNetworkId in class Entity
      Returns:
      the network id
    • updateMovement

      public void updateMovement()
      Overrides:
      updateMovement in class EntityPhysical
    • requireBehaviorGroup

      public IBehaviorGroup requireBehaviorGroup()
      Description copied from class: EntityIntelligent
      请求一个行为组实例,此方法在实体初始化行为组时调用
      Overrides:
      requireBehaviorGroup in class EntityIntelligent
      Returns:
      新创建的行为组
    • getWidth

      public float getWidth()
      Overrides:
      getWidth in class Entity
    • getHeight

      public float getHeight()
      Description copied from class: Entity
      实体高度

      entity Height

      Overrides:
      getHeight in class Entity
      Returns:
      the height
    • attackTarget

      @PowerNukkitXOnly @Since("1.19.30-r1") public boolean attackTarget(Entity entity)
      Specified by:
      attackTarget in interface EntityCanAttack
    • initEntity

      public void initEntity()
      Overrides:
      initEntity in class EntityAnimal
    • saveNBT

      public void saveNBT()
      Overrides:
      saveNBT in class EntityAnimal
    • onInteract

      public boolean onInteract(Player player, Item item, Vector3 clickedPos)
      Specified by:
      onInteract in interface EntityNameable
      Overrides:
      onInteract in class EntityAnimal
    • getDrops

      public Item[] getDrops()
      Overrides:
      getDrops in class EntityLiving
    • getOriginalName

      @PowerNukkitOnly @Since("1.5.1.0-PN") public String getOriginalName()
      Description copied from class: Entity
      The name that English name of the type of this entity.
      Overrides:
      getOriginalName in class Entity
    • isBreedingItem

      @PowerNukkitXOnly @Since("1.19.30-r1") public boolean isBreedingItem(Item item)
      绑定猫繁殖物品 WIKI了解只能使用生鲑鱼与生鳕鱼才能繁殖

      Bound cat breeding items WIKI understands that only raw salmon and raw cod can be used to breed

      Overrides:
      isBreedingItem in class EntityAnimal
      Parameters:
      item - 物品
      Returns:
      boolean 是否可以导致繁殖
      Whether it can lead to reproduction
    • getHealingAmount

      @PowerNukkitXOnly @Since("1.19.30-r1") public int getHealingAmount(Item item)
      获得可以治疗猫的物品的治疗量 WIKI了解只有生鲑鱼与生鳕鱼才能恢复猫咪血量恢复2

      Obtain healing amount of items that can heal cats WIKI understands that only raw salmon and raw cod can restore the cat's blood recovery 2

      Specified by:
      getHealingAmount in interface EntityHealable
    • setCollarColor

      @PowerNukkitXOnly @Since("1.19.30-r1") public void setCollarColor(DyeColor color)
    • getDiffHandDamage

      public float[] getDiffHandDamage()
      Description copied from interface: EntityCanAttack
      得到所有难度下不携带物品能造成的伤害.

      Get the damage you can do without carrying items on all difficulties.

      Specified by:
      getDiffHandDamage in interface EntityCanAttack
      Returns:
      一个包含所有难度下伤害的数组, 0 1 2分别代表简单、普通、困难难度
      An array containing damage on all difficulties, 0 1 2 for easy, normal and hard difficulties respectively