类 SizedFluidIngredient
java.lang.Object
net.neoforged.neoforge.fluids.crafting.SizedFluidIngredient
Standard implementation for a FluidIngredient with an amount.
FluidIngredient
, like its item counterpart, explicitly does not perform count checks,
so this class is used to (a) wrap a standard FluidIngredient with an amount and (b) provide a
standard serialization format for mods to use.
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明private final int
static final com.mojang.serialization.Codec
<SizedFluidIngredient> The codec forSizedFluidIngredient
.private final FluidIngredient
static final StreamCodec
<RegistryFriendlyByteBuf, SizedFluidIngredient> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明int
amount()
boolean
int
hashCode()
static SizedFluidIngredient
boolean
test
(FluidStack stack) Performs a size-sensitive test on the given stack.toString()
-
字段详细资料
-
CODEC
The codec forSizedFluidIngredient
.With this codec, the amount is serialized separately from the ingredient itself, for example:
{ "ingredient": "minecraft:lava", "amount": 1000 }
or for custom ingredients:
{ "ingredient": { "neoforge:type": "neoforge:intersection", "children": [ "#example:tag1", "#example:tag2" ], }, "amount": 4711 }
-
STREAM_CODEC
-
ingredient
-
amount
private final int amount
-
-
构造器详细资料
-
SizedFluidIngredient
-
-
方法详细资料