Class EntityChestBoat

All Implemented Interfaces:
EntityInteractable, EntityRideable, InventoryHolder, Metadatable, Cloneable

@PowerNukkitXOnly @Since("1.6.0.0-PNX") public class EntityChestBoat extends EntityBoat implements InventoryHolder
  • Field Details

  • Constructor Details

  • Method Details

    • getOriginalName

      public String getOriginalName()
      Description copied from class: Entity
      The name that English name of the type of this entity.
      Overrides:
      getOriginalName in class EntityBoat
    • getNetworkId

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

      Get the network ID of the entity

      Overrides:
      getNetworkId in class EntityBoat
      Returns:
      the network id
    • getInventory

      public ChestBoatInventory getInventory()
      Specified by:
      getInventory in interface InventoryHolder
    • onInteract

      public boolean onInteract(Player player, Item item, Vector3 clickedPos)
      Overrides:
      onInteract in class EntityBoat
    • createAddEntityPacket

      protected DataPacket createAddEntityPacket()
      Overrides:
      createAddEntityPacket in class EntityBoat
    • getInteractButtonText

      public String getInteractButtonText(Player player)
      Specified by:
      getInteractButtonText in interface EntityInteractable
      Overrides:
      getInteractButtonText in class EntityBoat
    • 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 EntityBoat
    • saveNBT

      public void saveNBT()
      Overrides:
      saveNBT in class EntityBoat
    • dropItem

      @Since("1.6.0.0-PNX") protected void dropItem()
      Overrides:
      dropItem in class EntityBoat