Package hiiragi283.core.api.item.alchemy
Object HTPotionHelper
-
- All Implemented Interfaces:
public class HTPotionHelper- Since:
0.3.0
Hiiragi Tsubasa
-
-
Field Summary
Fields Modifier and Type Field Description public final static HTPotionHelperINSTANCE
-
Method Summary
Modifier and Type Method Description final static HTPotionContentsgetContents(DataComponentHolder holder)指定したholderからHTPotionContentsを取得します。 final static <T extends MutableDataComponentHolder> TsetContents(T holder, HTPotionContents contents)指定したholderにcontentsを設定します。 final static PotionContentsgetPotion(DataComponentHolder holder)指定したholderからPotionContentsを取得します。 final static StringgetPotionModId(DataComponentHolder holder)指定したholderからポーションのMod IDを取得します。 final static StringgetPotionDescId(DataComponentHolder holder)指定したholderからポーションの翻訳キーを取得します。 final static ItemStackcreatePotion(HTPotionContents contents)指定したcontentsからポーションのItemStackを作成します。 final static ItemStackcreatePotion(ItemLike item, Holder<Potion> potion, Integer count)指定した引数からポーションのItemStackを作成します。 final static ItemStackcreatePotion(ItemLike item, PotionContents contents, Integer count)指定した引数からポーションのItemStackを作成します。 -
-
Method Detail
-
getContents
final static HTPotionContents getContents(DataComponentHolder holder)
指定したholderからHTPotionContentsを取得します。
- Returns:
HTPotionContentsを取得できない場合は
null- Since:
0.11.0
-
setContents
final static <T extends MutableDataComponentHolder> T setContents(T holder, HTPotionContents contents)
- Since:
0.11.0
-
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(HTPotionContents contents)
指定したcontentsからポーションのItemStackを作成します。
- 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の個数
-
-
-
-