类 CustomDisplayFluidIngredient
java.lang.Object
net.neoforged.neoforge.fluids.crafting.FluidIngredient
net.neoforged.neoforge.fluids.crafting.CustomDisplayFluidIngredient
- 所有已实现的接口:
Predicate<FluidStack>
FluidIngredient that wraps another fluid ingredient to override its
SlotDisplay
.-
字段概要
字段修饰符和类型字段说明private final FluidIngredient
static final com.mojang.serialization.MapCodec
<CustomDisplayFluidIngredient> private final SlotDisplay
static final StreamCodec
<RegistryFriendlyByteBuf, CustomDisplayFluidIngredient> 从类继承的字段 net.neoforged.neoforge.fluids.crafting.FluidIngredient
OPTIONAL_STREAM_CODEC
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明base()
display()
返回 a slot display for this ingredient, used for display on the client-side。boolean
返回 a stream of fluids accepted by this ingredient。getType()
返回 The type of this fluid ingredient.。int
hashCode()
boolean
isSimple()
Returns whether this fluid ingredient always requires direct stack testing.static FluidIngredient
of
(FluidIngredient base, SlotDisplay display) boolean
test
(FluidStack stack) Checks if a given fluid stack matches this ingredient.toString()
从类继承的方法 net.neoforged.neoforge.fluids.crafting.FluidIngredient
displayForSingleFluid, fluids, of, of, of, of
-
字段详细资料
-
CODEC
-
STREAM_CODEC
-
base
-
display
-
-
构造器详细资料
-
CustomDisplayFluidIngredient
-
-
方法详细资料
-
of
-
test
从类复制的说明:FluidIngredient
Checks if a given fluid stack matches this ingredient. The stack must not be modified in any way.- 指定者:
test
在接口中Predicate<FluidStack>
- 指定者:
test
在类中FluidIngredient
- 参数:
stack
- the stack to test- 返回:
true
if the stack matches,false
otherwise
-
generateFluids
从类复制的说明:FluidIngredient
返回 a stream of fluids accepted by this ingredient。For compatibility reasons, implementations should follow the same guidelines as for custom item ingredients, i.e.:
- Returned fluids are generally used for display purposes, and need not be exhaustive or perfectly accurate, as ingredients may additionally filter by e.g. data component values.
- An exception is ingredients that are simple,
for which it is important that this stream corresponds exactly all fluids accepted by
FluidIngredient.test(FluidStack)
! - At least one stack should always be returned, so that the ingredient is not considered empty. Empty ingredients may invalidate recipes!
Note: no caching needs to be done by the implementation, this is already handled by
FluidIngredient.fluids
!- 指定者:
generateFluids
在类中FluidIngredient
- 返回:
- a stream of all fluid stacks this ingredient accepts.
Note: No guarantees are made as to the amount of the fluid, as FluidIngredients are generally not meant to match by amount and these stacks are mostly used for display.
- 另请参阅:
-
isSimple
public boolean isSimple()从类复制的说明:FluidIngredient
Returns whether this fluid ingredient always requires direct stack testing.- 指定者:
isSimple
在类中FluidIngredient
- 返回:
true
if this ingredient ignores NBT data when matching stacks,false
otherwise- 另请参阅:
-
getType
从类复制的说明:FluidIngredient
返回 The type of this fluid ingredient.。The type must be registered to
NeoForgeRegistries.FLUID_INGREDIENT_TYPES
.- 指定者:
getType
在类中FluidIngredient
- 返回:
- The type of this fluid ingredient.
-
base
-
display
从类复制的说明:FluidIngredient
返回 a slot display for this ingredient, used for display on the client-side。- 覆盖:
display
在类中FluidIngredient
- 返回:
- a slot display for this ingredient, used for display on the client-side
- 另请参阅:
-
equals
- 指定者:
equals
在类中FluidIngredient
-
hashCode
public int hashCode()- 指定者:
hashCode
在类中FluidIngredient
-
toString
-