Class FluidFilterUtil
java.lang.Object
alexiil.mc.lib.attributes.fluid.filter.FluidFilterUtil
-
Method Summary
Modifier and TypeMethodDescriptiondecomposeFilter(FluidFilter filter)
Attempts to decompose the given filter down into it's componentFluidKey
's, if it implementsReadableFluidFilter
.findIntersection(FluidFilter filter, Set<FluidKey> set)
Finds the set ofFluidKey
s which are both in the set and match the given filter.findIntersection(FluidFilter filter, Set<FluidKey> set, boolean resolve)
Finds the set ofFluidKey
s which are both in the set and match the given filter.static boolean
-
Method Details
-
hasIntersection
-
decomposeFilter
Attempts to decompose the given filter down into it's componentFluidKey
's, if it implementsReadableFluidFilter
.- Returns:
- Null if the set could not be computed (either because the filter was
ConstantFluidFilter.ANYTHING
or if it was not readable in some other way).
-
findIntersection
Finds the set ofFluidKey
s which are both in the set and match the given filter. -
findIntersection
public static Set<FluidKey> findIntersection(FluidFilter filter, Set<FluidKey> set, boolean resolve)Finds the set ofFluidKey
s which are both in the set and match the given filter.- Parameters:
resolve
- If true thenResolvableFluidFilter
s will be resolved. This should only be true if you use the returned set immediately, and don't retain it.
-