Class ItemCustom

java.lang.Object
cn.nukkit.item.Item
cn.nukkit.item.StringItem
cn.nukkit.item.customitem.ItemCustom
All Implemented Interfaces:
BlockID, ItemID, Cloneable
Direct Known Subclasses:
ItemCustomArmor, ItemCustomEdible, ItemCustomTool

@PowerNukkitXOnly @Since("1.6.0.0-PNX") public abstract class ItemCustom extends StringItem
Author:
lt_name
  • Constructor Details

    • ItemCustom

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

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

    • allowOffHand

      public boolean allowOffHand()
    • getCreativeCategory

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

      public String getCreativeGroup()
      控制自定义物品在创造栏的分组,例如所有的附魔书是一组

      关于填写的字符串请参阅 bedrock wiki

      Returns:
      自定义物品的分组
    • getEnchantableValue

      public int getEnchantableValue()
    • getComponentsData

      public CompoundTag getComponentsData()
    • clone

      public ItemCustom clone()
      Overrides:
      clone in class StringItem
    • getRuntimeId

      public int getRuntimeId()
    • setTextureName

      public void setTextureName(String textureName)
    • getTextureName

      public String getTextureName()
    • setTextureSize

      public void setTextureSize(int textureSize)
    • getTextureSize

      public int getTextureSize()