Interface ResolvableFluidFilter

All Superinterfaces:
FluidFilter, ReadableFluidFilter
All Known Implementing Classes:
FluidTagFilter, RawFluidTagFilter
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ResolvableFluidFilter extends ReadableFluidFilter
A type of ReadableFluidFilter that may be resolved at a later time to a fixed ReadableFluidFilter, but which isn't constant over time. (For example item tags may be reloaded, but are stored in a static field and so don't need to be re-created often. (And can be read)).
  • Method Details

    • resolve

      Resolves this ReadableFluidFilter. Note that this must return one of the valid types of ReadableFluidFilter, except this!

      This is intended for use-cases where you actually need to read the filter - for other cases there's usually little reason to call this, as "matches" should be faster for most reasonable implementations. (However some implementations - for example lambdas - might be faster to call multiple times if you resolve them before checking them).

    • matches

      default boolean matches(FluidKey fluid)
      Checks to see if the given filter matches the given fluid key.

      This is overridden primarily for lambdas - most implementing classes are expected to override this, because it will most likely be faster.

      Specified by:
      matches in interface FluidFilter