Class EntityWolf

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

Author:
BeYkeRYkt (Nukkit Project), Cool_Loong (PowerNukkitX Project) todo 野生狼不会被刷新
  • 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
    • 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
    • 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
    • initEntity

      public void initEntity()
      Description copied from class: Entity
      实体初始化顺序,先初始化Entity类字段->Entity构造函数->进入init方法->调用initEntity方法->子类字段初始化->子类构造函数

      用于初始化实体的NBT和实体字段的方法

      Entity initialization order, first initialize the Entity class field->Entity constructor->Enter the init method->Call the init Entity method-> subclass field initialization-> subclass constructor

      The method used to initialize the NBT and entity fields of the entity

      Overrides:
      initEntity in class EntityAnimal
    • onUpdate

      public boolean onUpdate(int currentTick)
      Overrides:
      onUpdate in class EntityPhysical
    • onInteract

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

      @PowerNukkitXOnly @Since("1.19.30-r1") public boolean isBreedingItem(Item item)
      Description copied from class: EntityAnimal
      可以导致繁殖的喂养物品

      Feeding items that can lead to reproduction.

      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)
      获得可以治疗狼的物品的治疗量
      Specified by:
      getHealingAmount in interface EntityHealable
    • attackTarget

      @PowerNukkitXOnly @Since("1.19.30-r1") public boolean attackTarget(Entity entity)
      Specified by:
      attackTarget in interface EntityCanAttack
    • 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