接口 ItemType.Typed<M extends ItemMeta>

类型参数:
M - the generic type of the item meta that represents the item type.
所有超级接口:
ItemType, Keyed, Translatable
封闭接口:
ItemType

public static interface ItemType.Typed<M extends ItemMeta> extends ItemType
Typed represents a subtype of ItemTypes that have a known item meta type at compile time.
  • 方法详细资料

    • getItemMetaClass

      @NotNull @NotNull Class<M> getItemMetaClass()
      Gets the ItemMeta class of this ItemType
      指定者:
      getItemMetaClass 在接口中 ItemType
      返回:
      the ItemMeta class of this ItemType
    • createItemStack

      @NotNull @NotNull ItemStack createItemStack(@Nullable @Nullable Consumer<? super M> metaConfigurator)
      Constructs a new item stack with this item type with the amount 1.
      参数:
      metaConfigurator - an optional consumer of the items ItemMeta that is called. May be null if no intent exists to mutate the item meta at this point.
      返回:
      the created and configured item stack.
    • createItemStack

      @NotNull @NotNull ItemStack createItemStack(int amount, @Nullable @Nullable Consumer<? super M> metaConfigurator)
      Constructs a new item stack with this item type.
      参数:
      amount - the amount of itemstack.
      metaConfigurator - an optional consumer of the items ItemMeta that is called. May be null if no intent exists to mutate the item meta at this point.
      返回:
      the created and configured item stack.