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 PotionContentsgetPotion(DataComponentHolder holder)指定したholderからPotionContentsを取得します。 final static UnitsetPotion(MutableDataComponentHolder holder, PotionContents contents)final static StringgetPotionModId(DataComponentHolder holder)指定したholderからポーションのMod IDを取得します。 final static StringgetPotionDescId(DataComponentHolder holder)指定したholderからポーションの翻訳キーを取得します。 final static ItemStackcreatePotion(BottledPotionContents contents)指定したcontentsからポーションのItemStackを作成します。 final static ItemStackcreatePotion(ItemLike item, Holder<Potion> potion, Integer count)指定した引数からポーションのItemStackを作成します。 final static ItemStackcreatePotion(ItemLike item, PotionContents contents, Integer count)指定した引数からポーションのItemStackを作成します。 final static BottledPotionContentsgetContents(ItemStack stack)指定したstackからBottledPotionContentsを取得します。 final static BottledPotionContentsgetContents(HTItemResourceType resource)指定したresourceからBottledPotionContentsを取得します。 final static BottledPotionContentsgetContents(FluidStack stack)指定したstackからBottledPotionContentsを取得します。 final static BottledPotionContentsgetContents(HTFluidResourceType resource)指定したresourceからBottledPotionContentsを取得します。 final static BottledPotionContentsgetContentsFromBottle(HTItemResourceType resource)指定したresourceからBottledPotionContentsを取得します。 final static ItemStacksetContents(ItemStack stack, BottledPotionContents contents)指定したstackにcontentsを設定します。 final static FluidStacksetContents(FluidStack stack, BottledPotionContents contents)指定したstackにcontentsを設定します。 -
-
Method Detail
-
getPotion
final static PotionContents getPotion(DataComponentHolder holder)
指定したholderからPotionContentsを取得します。
- Returns:
値を保持していない場合はPotionContents.EMPTY
- Since:
0.10.0
-
setPotion
final static Unit setPotion(MutableDataComponentHolder holder, PotionContents contents)
- Since:
0.14.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(BottledPotionContents 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の個数
-
getContents
final static BottledPotionContents getContents(ItemStack stack)
指定したstackからBottledPotionContentsを取得します。
- Returns:
BottledPotionContentsを取得できない場合は
null- Since:
0.14.0
-
getContents
final static BottledPotionContents getContents(HTItemResourceType resource)
指定したresourceからBottledPotionContentsを取得します。
- Returns:
BottledPotionContentsを取得できない場合は
null- Since:
0.14.0
-
getContents
final static BottledPotionContents getContents(FluidStack stack)
指定したstackからBottledPotionContentsを取得します。
- Returns:
BottledPotionContentsを取得できない場合は
null- Since:
0.11.0
-
getContents
final static BottledPotionContents getContents(HTFluidResourceType resource)
指定したresourceからBottledPotionContentsを取得します。
- Returns:
BottledPotionContentsを取得できない場合は
null- Since:
0.14.0
-
getContentsFromBottle
final static BottledPotionContents getContentsFromBottle(HTItemResourceType resource)
指定したresourceからBottledPotionContentsを取得します。
- Returns:
BottledPotionContentsを取得できない場合は
null- Since:
0.14.0
-
setContents
final static ItemStack setContents(ItemStack stack, BottledPotionContents contents)
- Since:
0.14.0
-
setContents
final static FluidStack setContents(FluidStack stack, BottledPotionContents contents)
- Since:
0.11.0
-
-
-
-