Class FluidFilterUtil
java.lang.Object
alexiil.mc.lib.attributes.fluid.filter.FluidFilterUtil
public final class FluidFilterUtil
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description static java.util.Set<FluidKey>decomposeFilter(FluidFilter filter)Attempts to decompose the given filter down into it's componentFluidKey's, if it implementsReadableFluidFilter.static java.util.Set<FluidKey>findIntersection(FluidFilter filter, java.util.Set<FluidKey> set)Finds the set ofFluidKeys which are both in the set and match the given filter.static java.util.Set<FluidKey>findIntersection(FluidFilter filter, java.util.Set<FluidKey> set, boolean resolve)Finds the set ofFluidKeys which are both in the set and match the given filter.static booleanhasIntersection(FluidFilter a, FluidFilter b)
-
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.ANYTHINGor if it was not readable in some other way).
-
findIntersection
public static java.util.Set<FluidKey> findIntersection(FluidFilter filter, java.util.Set<FluidKey> set)Finds the set ofFluidKeys which are both in the set and match the given filter. -
findIntersection
public static java.util.Set<FluidKey> findIntersection(FluidFilter filter, java.util.Set<FluidKey> set, boolean resolve)Finds the set ofFluidKeys which are both in the set and match the given filter.- Parameters:
resolve- If true thenResolvableFluidFilters will be resolved. This should only be true if you use the returned set immediately, and don't retain it.
-