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
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<SimpleFluidContent> static final SimpleFluidContent
private final FluidStack
static final StreamCodec
<RegistryFriendlyByteBuf, SimpleFluidContent> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
static SimpleFluidContent
copyOf
(FluidStack fluidStack) boolean
int
getFluid()
int
hashCode()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isEmpty()
boolean
isSameFluid
(FluidStack other) boolean
boolean
boolean
matches
(FluidStack other) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.core.component.DataComponentHolder
get, getOrDefault, has
Methods 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:
getComponents
in interfaceDataComponentHolder
-
equals
-
hashCode
public int hashCode()
-