Class EntityArmorStand

All Implemented Interfaces:
EntityInteractable, EntityNameable, EntityInventoryHolder, InventoryHolder, Metadatable, Cloneable

@PowerNukkitOnly @Since("1.4.0.0-PN") public class EntityArmorStand extends Entity implements EntityInventoryHolder, EntityInteractable, EntityNameable
  • Field Details

  • 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
    • getHeight

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

      entity Height

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

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

      protected float getGravity()
      Overrides:
      getGravity in class Entity
    • initEntity

      protected 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 Entity
    • isPersistent

      @PowerNukkitOnly public boolean isPersistent()
      Specified by:
      isPersistent in interface EntityNameable
    • setPersistent

      @PowerNukkitOnly public void setPersistent(boolean persistent)
      Specified by:
      setPersistent in interface EntityNameable
    • onInteract

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

      public void saveNBT()
      Overrides:
      saveNBT in class Entity
    • spawnTo

      public void spawnTo(Player player)
      Description copied from class: Entity
      将这个实体在客户端生成,让该玩家可以看到它

      Spawn this entity on the client side so that the player can see it

      Overrides:
      spawnTo in class Entity
      Parameters:
      player - the player
    • spawnToAll

      public void spawnToAll()
      Overrides:
      spawnToAll in class Entity
    • fall

      public void fall(float fallDistance)
      Overrides:
      fall in class Entity
    • kill

      public void kill()
      Overrides:
      kill in class Entity
    • attack

      public boolean attack(EntityDamageEvent source)
      Description copied from class: Entity
      当一个实体被攻击时(即接受一个实体伤害事件 这个事件可以是由其他实体攻击导致,也可能是自然伤害)调用.

      Called when an entity is attacked (i.e. receives an entity damage event. This event can be caused by an attack by another entity, or it can be a natural damage).

      Overrides:
      attack in class Entity
      Parameters:
      source - 记录伤害源的事件
      Record the event of the source of the attack
      Returns:
      是否攻击成功
      Whether the attack was successful
    • getOriginalName

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

      public boolean entityBaseTick(int tickDiff)
      Overrides:
      entityBaseTick in class Entity
    • getArmorInventory

      public EntityArmorInventory getArmorInventory()
      Specified by:
      getArmorInventory in interface EntityInventoryHolder
    • getEquipmentInventory

      @PowerNukkitOnly @Since("1.4.0.0-PN") public EntityEquipmentInventory getEquipmentInventory()
      Specified by:
      getEquipmentInventory in interface EntityInventoryHolder
    • getInventory

      public EntityArmorInventory getInventory()
      Specified by:
      getInventory in interface InventoryHolder
    • onUpdate

      public boolean onUpdate(int currentTick)
      Overrides:
      onUpdate in class Entity
    • getDrag

      protected float getDrag()
      Overrides:
      getDrag in class Entity
    • getInteractButtonText

      public String getInteractButtonText(Player player)
      Specified by:
      getInteractButtonText in interface EntityInteractable
    • canDoInteraction

      public boolean canDoInteraction()
      Specified by:
      canDoInteraction in interface EntityInteractable
    • canEquipByDispenser

      public boolean canEquipByDispenser()
      Specified by:
      canEquipByDispenser in interface EntityInventoryHolder