Object HTPotionHelper

  • All Implemented Interfaces:

    
    public class HTPotionHelper
    
                        
    Since:

    0.3.0

    Author:

    Hiiragi Tsubasa

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static HTPotionContents getContents(DataComponentHolder holder) 指定したholderからHTPotionContentsを取得します。
      final static <T extends MutableDataComponentHolder> T setContents(T holder, HTPotionContents contents) 指定したholdercontentsを設定します。
      final static PotionContents getPotion(DataComponentHolder holder) 指定したholderからPotionContentsを取得します。
      final static String getPotionModId(DataComponentHolder holder) 指定したholderからポーションのMod IDを取得します。
      final static String getPotionDescId(DataComponentHolder holder) 指定したholderからポーションの翻訳キーを取得します。
      final static ItemStack createPotion(HTPotionContents contents) 指定したcontentsからポーションのItemStackを作成します。
      final static ItemStack createPotion(ItemLike item, Holder<Potion> potion, Integer count) 指定した引数からポーションのItemStackを作成します。
      final static ItemStack createPotion(ItemLike item, PotionContents contents, Integer count) 指定した引数からポーションのItemStackを作成します。
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • getPotion

         final static PotionContents getPotion(DataComponentHolder holder)

        指定したholderからPotionContentsを取得します。

        Returns:

        値を保持していない場合はPotionContents.EMPTY

        Since:

        0.10.0

      • getPotionModId

         final static String getPotionModId(DataComponentHolder holder)

        指定したholderからポーションのMod IDを取得します。

        Since:

        0.11.0

      • getPotionDescId

         final static String getPotionDescId(DataComponentHolder holder)

        指定したholderからポーションの翻訳キーを取得します。

        Returns:

        holderがポーションを保持していない場合はnull

        Since:

        0.11.0

      • createPotion

         final static ItemStack createPotion(ItemLike item, Holder<Potion> potion, Integer count)

        指定した引数からポーションのItemStackを作成します。

        Parameters:
        item - アイテムの種類
        potion - ポーションの中身
        count - ItemStackの個数
      • createPotion

         final static ItemStack createPotion(ItemLike item, PotionContents contents, Integer count)

        指定した引数からポーションのItemStackを作成します。

        Parameters:
        item - アイテムの種類
        contents - ポーションの中身
        count - ItemStackの個数