类 SimpleFluidContent
java.lang.Object
net.neoforged.neoforge.fluids.SimpleFluidContent
Stock data component class to hold a
FluidStack
.
A corresponding DataComponentType
must be registered to use this class.
-
字段概要
字段修饰符和类型字段说明static final com.mojang.serialization.Codec
<SimpleFluidContent> static final SimpleFluidContent
private final FluidStack
static final StreamCodec
<RegistryFriendlyByteBuf, SimpleFluidContent> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明copy()
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) 从接口继承的方法 net.minecraft.core.component.DataComponentGetter
get, getOrDefault, getTyped, has
从接口继承的方法 net.minecraft.core.component.DataComponentHolder
get, getAllOfType, getOrDefault, has
从接口继承的方法 net.neoforged.neoforge.common.extensions.IDataComponentHolderExtension
addToTooltip, addToTooltip
-
字段详细资料
-
EMPTY
-
CODEC
-
STREAM_CODEC
-
fluidStack
-
-
构造器详细资料
-
SimpleFluidContent
-
-
方法详细资料
-
copyOf
-
copy
-
isEmpty
public boolean isEmpty() -
getFluid
-
getFluidHolder
-
is
-
is
-
is
-
is
-
is
-
getAmount
public int getAmount() -
getFluidType
-
is
-
matches
-
isSameFluid
-
isSameFluidSameComponents
-
isSameFluidSameComponents
-
getComponents
- 指定者:
getComponents
在接口中DataComponentHolder
-
equals
-
hashCode
public int hashCode()
-