Package net.neoforged.neoforge.fluids
Class SimpleFluidContent
java.lang.Object
net.neoforged.neoforge.fluids.SimpleFluidContent
- All Implemented Interfaces:
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 java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.core.component.DataComponentHolder
get, getOrDefault, hasMethods inherited from interface net.neoforged.neoforge.common.extensions.IDataComponentHolderExtension
addToTooltip, addToTooltip, get, getOrDefault, has
-
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
public int hashCode()
-