Class ItemStacksKt

  • All Implemented Interfaces:

    
    public final class ItemStacksKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static <T extends Any> Either<ErrorText, ItemStackTemplate> createItemTemplate(ItemLike item, DataComponentType<T> type, T value, Integer count)
      final static Either<ErrorText, ItemStackTemplate> createItemTemplate(ItemLike item, Integer count, DataComponentPatch patch)
      final static ItemStack createOrEmpty(ItemStackTemplate $self)
      final static <T extends Any> ItemStack createItemStack(ItemLike item, DataComponentType<T> type, T value, Integer count)
      final static ItemStack createItemStack(ItemLike item, Integer count, DataComponentPatch patch) 指定した引数から新しいItemStackのインスタンスを作成します。
      final static ItemStackTemplate toTemplateOrNull(ItemStack $self)
      final static Either<ErrorText, ItemStackTemplate> toTemplateResult(ItemStack $self)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • createOrEmpty

         final static ItemStack createOrEmpty(ItemStackTemplate $self)
      • createItemStack

         final static <T extends Any> ItemStack createItemStack(ItemLike item, DataComponentType<T> type, T value, Integer count)
      • createItemStack

         final static ItemStack createItemStack(ItemLike item, Integer count, DataComponentPatch patch)

        指定した引数から新しいItemStackのインスタンスを作成します。

        Parameters:
        item - アイテムの種類
        count - アイテムの量
        patch - 適応するコンポーネントの差分
        Since:

        0.6.0

      • toTemplateOrNull

         final static ItemStackTemplate toTemplateOrNull(ItemStack $self)