Class FluidFilterUtil

java.lang.Object
alexiil.mc.lib.attributes.fluid.filter.FluidFilterUtil

public final class FluidFilterUtil extends Object
  • Method Details

    • hasIntersection

      public static boolean hasIntersection(FluidFilter a, FluidFilter b)
    • decomposeFilter

      @Nullable public static Set<FluidKey> decomposeFilter(FluidFilter filter)
      Attempts to decompose the given filter down into it's component FluidKey's, if it implements ReadableFluidFilter.
      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

      public static Set<FluidKey> findIntersection(FluidFilter filter, Set<FluidKey> set)
      Finds the set of FluidKeys 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 of FluidKeys which are both in the set and match the given filter.
      Parameters:
      resolve - If true then ResolvableFluidFilters will be resolved. This should only be true if you use the returned set immediately, and don't retain it.