Class EntityPainting

All Implemented Interfaces:
Metadatable, Cloneable

public class EntityPainting extends EntityHanging
Author:
MagicDroidX (Nukkit Project)
  • Field Details

  • Constructor Details

  • Method Details

    • getMotive

      public static EntityPainting.Motive getMotive(String name)
    • getWidth

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

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

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

      entity Height

      Overrides:
      getHeight in class Entity
      Returns:
      the height
    • 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
    • initEntity

      protected void initEntity()
      Overrides:
      initEntity in class EntityHanging
    • createAddEntityPacket

      public DataPacket createAddEntityPacket()
      Overrides:
      createAddEntityPacket 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
    • saveNBT

      public void saveNBT()
      Overrides:
      saveNBT in class EntityHanging
    • onPushByPiston

      @PowerNukkitOnly public void onPushByPiston(BlockEntityPistonArm piston)
      Overrides:
      onPushByPiston in class Entity
    • getArt

      public EntityPainting.Motive getArt()
    • getMotive

      public EntityPainting.Motive getMotive()
    • 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