Class RawFluidTagFilter
java.lang.Object
alexiil.mc.lib.attributes.fluid.filter.RawFluidTagFilter
- All Implemented Interfaces:
FluidFilter
,ReadableFluidFilter
,ResolvableFluidFilter
public final class RawFluidTagFilter extends java.lang.Object implements ResolvableFluidFilter
-
Field Summary
Fields Modifier and Type Field Description net.minecraft.tag.Tag<net.minecraft.fluid.Fluid>
tag
-
Constructor Summary
Constructors Constructor Description RawFluidTagFilter(net.minecraft.tag.Tag<net.minecraft.fluid.Fluid> tag)
-
Method Summary
Modifier and Type Method Description boolean
matches(FluidKey fluidKey)
Checks to see if the given filter matches the given fluid key.ReadableFluidFilter
resolve()
Resolves thisReadableFluidFilter
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface alexiil.mc.lib.attributes.fluid.filter.FluidFilter
and, asPredicate, negate, or
-
Field Details
-
tag
public final net.minecraft.tag.Tag<net.minecraft.fluid.Fluid> tag
-
-
Constructor Details
-
RawFluidTagFilter
public RawFluidTagFilter(net.minecraft.tag.Tag<net.minecraft.fluid.Fluid> tag)
-
-
Method Details
-
matches
Description copied from interface:ResolvableFluidFilter
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 interfaceFluidFilter
- Specified by:
matches
in interfaceResolvableFluidFilter
-
resolve
Description copied from interface:ResolvableFluidFilter
Resolves thisReadableFluidFilter
. Note that this must return one of the valid types ofReadableFluidFilter
, 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).
- Specified by:
resolve
in interfaceResolvableFluidFilter
-