Package hiiragi283.lib
Class HTPlatform
-
- All Implemented Interfaces:
public abstract class HTPlatform
-
-
Field Summary
Fields Modifier and Type Field Description public final static HTPlatformINSTANCE
-
Constructor Summary
Constructors Constructor Description HTPlatform()
-
Method Summary
Modifier and Type Method Description abstract <T extends TypedInstance<Item>, DataComponentGetter> BottledPotionContentsgetContentsFromItem(T instance)指定したinstanceからBottledPotionContentsを取得します。 abstract <T extends TypedInstance<Fluid>, DataComponentGetter> BottledPotionContentsgetContentsFromFluid(T instance)abstract DataComponentPatchcreateFluidPatch(Fluid fluid, BottledPotionContents contents)abstract DataComponentPatchcreateItemPatch(BottledPotionContents contents)final <T extends Any> Either<ErrorText, SupplierWithId<T>>getFirstHolder(HolderLookup.Provider provider, TagKey<T> tagKey)指定したproviderから,tagKeyに紐づいた値を取得します。 final <T extends Any> Either<ErrorText, SupplierWithId<T>>getFirstHolder(HolderLookup<T> provider, TagKey<T> tagKey)指定したproviderから,tagKeyに紐づいた値を取得します。 -
-
Method Detail
-
getContentsFromItem
abstract <T extends TypedInstance<Item>, DataComponentGetter> BottledPotionContents getContentsFromItem(T instance)
指定したinstanceからBottledPotionContentsを取得します。
- Returns:
取得できなかった場合は
null- Since:
0.11.0
-
getContentsFromFluid
abstract <T extends TypedInstance<Fluid>, DataComponentGetter> BottledPotionContents getContentsFromFluid(T instance)
-
createFluidPatch
abstract DataComponentPatch createFluidPatch(Fluid fluid, BottledPotionContents contents)
-
createItemPatch
abstract DataComponentPatch createItemPatch(BottledPotionContents contents)
-
getFirstHolder
final <T extends Any> Either<ErrorText, SupplierWithId<T>> getFirstHolder(HolderLookup.Provider provider, TagKey<T> tagKey)
- Returns:
-
getFirstHolder
final <T extends Any> Either<ErrorText, SupplierWithId<T>> getFirstHolder(HolderLookup<T> provider, TagKey<T> tagKey)
- Returns:
- Since:
0.17.0
-
-
-
-