Class ItemCustomArmor

All Implemented Interfaces:
BlockID, ItemDurable, ItemID, Cloneable

@PowerNukkitXOnly @Since("1.6.0.0-PNX") public abstract class ItemCustomArmor extends ItemCustom implements ItemDurable
Author:
lt_name
  • Field Details

  • Constructor Details

    • ItemCustomArmor

      public ItemCustomArmor(@Nonnull String id, @Nullable String name)
    • ItemCustomArmor

      public ItemCustomArmor(@Nonnull String id, @Nullable String name, @Nonnull String textureName)
  • Method Details

    • getCreativeCategory

      public int getCreativeCategory()
      Description copied from class: ItemCustom
      控制自定义物品在创造栏的大分类,例如建材栏,材料栏
      可选值: 2 nature 3 equipment 4 items
      Overrides:
      getCreativeCategory in class ItemCustom
      Returns:
      自定义物品的在创造栏的大分类
      See Also:
    • getComponentsData

      public CompoundTag getComponentsData()
      Overrides:
      getComponentsData in class ItemCustom
    • getMaxStackSize

      public int getMaxStackSize()
      Overrides:
      getMaxStackSize in class Item
    • getMaxDurability

      public int getMaxDurability()
      Overrides:
      getMaxDurability in class Item
    • isArmor

      public boolean isArmor()
      Overrides:
      isArmor in class Item
    • isHelmet

      public boolean isHelmet()
      Overrides:
      isHelmet in class Item
    • isChestplate

      public boolean isChestplate()
      Overrides:
      isChestplate in class Item
    • isLeggings

      public boolean isLeggings()
      Overrides:
      isLeggings in class Item
    • isBoots

      public boolean isBoots()
      Overrides:
      isBoots in class Item
    • getArmorPoints

      public int getArmorPoints()
      Overrides:
      getArmorPoints in class Item
    • onClickAir

      public boolean onClickAir(Player player, Vector3 directionVector)
      Description copied from class: Item
      Called when a player uses the item on air, for example throwing a projectile. Returns whether the item was changed, for example count decrease or durability change.
      Overrides:
      onClickAir in class Item
      Parameters:
      player - player
      directionVector - direction
      Returns:
      item changed
    • getEnchantAbility

      public int getEnchantAbility()
      Overrides:
      getEnchantAbility in class Item
    • isUnbreakable

      public boolean isUnbreakable()
      Overrides:
      isUnbreakable in class Item