Fluid Predicates
Since 1.20, fluid predicates match fluid values (notably not Fluid Stack, meaning no count or NBT). They are used in some contexts where fluids are present but not fluid stacks, preventing usage of standard Fluid Ingredient.
The following sections discuss supported serializers.
Common Predicates
Fluid predicates support all common predicate (including tag predicates).
Simple Predicates
The following predicates have no extra fields, and are simply defined by their type:
mantle:is_source: Matches the “source” form of fluids, but not the “flowing” form.mantle:has_bucket: Matches fluids that have a bucket form.mantle:lighter_than_air: Matches fluids with a negative density, suggesting they should flow upwards.tconstruct:fuel: Matches fluids that function as a smeltery fuel.
Fluid Set
The fluid set predicate matches if the fluid is within the given set. Fluid set predicates are effectively a hardcoded fluid tag predicate, useful when a set is not reusable enough to need a specific tag.
Fluid set predicates have the following format:
- A fluid predicate object.
- Always
mantle:set. - List of fluid IDs, matches if any match the input.
- Fluid ID option to match.
- Always
Fluid Type
The fluid type predicate matches any fluid with the given fluid type. Fluid types are a Forge feature that contain shared properties between the source and flowing forms of a fluid. It has the following format:
- A fluid predicate object.
- Always
mantle:fluid_type. - List of fluid types to match. Will be true if the fluid has any type in the list.
- A single fluid type to match.
- Always