Class HTFluidResourceType
-
- All Implemented Interfaces:
-
hiiragi283.core.api.registry.TypedInstance,hiiragi283.core.api.resource.HTIdLike,hiiragi283.core.api.resource.HTKeyLike,hiiragi283.core.api.storage.resource.HTResourceType,hiiragi283.core.api.storage.resource.HTResourceType.DataComponent,hiiragi283.core.api.storage.resource.HTResourceType.Registered,hiiragi283.core.api.text.HTHasText,net.minecraft.core.component.DataComponentHolder,net.neoforged.neoforge.common.extensions.IDataComponentHolderExtension,net.neoforged.neoforge.registries.datamaps.IWithData
public final class HTFluidResourceType implements HTResourceType.DataComponent<Fluid>
液体向けのHTResourceType.DataComponentの実装クラスです。
- Since:
0.4.0
Hiiragi Tsubasa
-
-
Field Summary
Fields Modifier and Type Field Description public final static BiCodec<RegistryFriendlyByteBuf, HTFluidResourceType>CODECprivate final Stringnamespaceprivate final Stringpathprivate final DataComponentMapcomponents
-
Method Summary
Modifier and Type Method Description StringgetNamespace()StringgetPath()final FluidTypefluidType()保持しているtypeのFluidTypeを返します。 final BooleanisOf(FluidStack stack)final FluidStacktoStack(Integer amount)Booleanequals(Object other)IntegerhashCode()StringtoString()final Holder<Fluid>component1()final DataComponentPatchcomponent2()DataComponentPatchcomponentsPatch()このリソースのDataComponentPatchを返します。 ComponentgetText()テキストを取得します。 Holder<Fluid>typeHolder()DataComponentMapgetComponents()final static HTFluidResourceTypeof(FluidStack stack)指定したstackをHTFluidResourceTypeに変換します。 -
Methods inherited from class hiiragi283.core.api.storage.fluid.HTFluidResourceType
getComponents -
Methods inherited from class hiiragi283.core.api.registry.TypedInstance
isOf, isOf, isOf, tags -
Methods inherited from class hiiragi283.core.api.storage.resource.HTResourceType.Registered
getData, getResourceKey -
Methods inherited from class hiiragi283.core.api.resource.HTIdLike
getId -
Methods inherited from class net.minecraft.core.component.DataComponentHolder
get, getOrDefault, has -
Methods inherited from class net.neoforged.neoforge.common.extensions.IDataComponentHolderExtension
addToTooltip, addToTooltip, get, getOrDefault, has -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getNamespace
String getNamespace()
-
fluidType
final FluidType fluidType()
保持しているtypeのFluidTypeを返します。
-
component1
final Holder<Fluid> component1()
-
component2
final DataComponentPatch component2()
-
componentsPatch
DataComponentPatch componentsPatch()
このリソースのDataComponentPatchを返します。
-
getText
Component getText()
テキストを取得します。
-
typeHolder
Holder<Fluid> typeHolder()
-
getComponents
DataComponentMap getComponents()
-
of
final static HTFluidResourceType of(FluidStack stack)
指定したstackをHTFluidResourceTypeに変換します。
- Returns:
FluidStack.isEmptyが
trueの場合はnull
-
-
-
-