Class SimpleFluidContent
java.lang.Object
net.neoforged.neoforge.fluids.SimpleFluidContent
- All Implemented Interfaces:
DataComponentGetter, DataComponentHolder, IDataComponentHolderExtension
Stock data component class to hold a
FluidStack.
A corresponding DataComponentType must be registered to use this class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SimpleFluidContent> static final SimpleFluidContentprivate final FluidStackstatic final StreamCodec<RegistryFriendlyByteBuf, SimpleFluidContent> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()static SimpleFluidContentcopyOf(FluidStack fluidStack) booleanintgetFluid()inthashCode()booleanbooleanbooleanbooleanbooleanbooleanbooleanisEmpty()booleanisSameFluid(FluidStack other) booleanbooleanbooleanmatches(FluidStack other) Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DataComponentGetter
get, getOrDefault, getTyped, hasMethods inherited from interface DataComponentHolder
get, getAllOfType, getOrDefault, hasMethods inherited from interface IDataComponentHolderExtension
addToTooltip, addToTooltip
-
Field Details
-
EMPTY
-
CODEC
-
STREAM_CODEC
-
fluidStack
-
-
Constructor Details
-
SimpleFluidContent
-
-
Method Details
-
copyOf
-
copy
-
isEmpty
public boolean isEmpty() -
getFluid
-
getFluidHolder
-
is
-
is
-
is
-
is
-
is
-
getAmount
public int getAmount() -
getFluidType
-
is
-
matches
-
isSameFluid
-
isSameFluidSameComponents
-
isSameFluidSameComponents
-
getComponents
- Specified by:
getComponentsin interfaceDataComponentHolder
-
equals
-
hashCode
-