Class ItemTagFilter
java.lang.Object
alexiil.mc.lib.attributes.item.filter.ItemTagFilter
- All Implemented Interfaces:
ItemFilter
,ReadableItemFilter
,ResolvableItemFilter
public final class ItemTagFilter extends java.lang.Object implements ResolvableItemFilter
-
Nested Class Summary
Nested classes/interfaces inherited from interface alexiil.mc.lib.attributes.item.filter.ItemFilter
ItemFilter.ItemFilterAsPredicate
-
Field Summary
Fields Modifier and Type Field Description net.minecraft.tag.Tag<net.minecraft.item.Item>
tag
-
Constructor Summary
Constructors Constructor Description ItemTagFilter(net.minecraft.tag.Tag<net.minecraft.item.Item> tag)
-
Method Summary
Modifier and Type Method Description ReadableItemFilter
resolve()
Resolves thisReadableItemFilter
.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.item.filter.ItemFilter
and, asPredicate, negate, or
-
Field Details
-
tag
public final net.minecraft.tag.Tag<net.minecraft.item.Item> tag
-
-
Constructor Details
-
ItemTagFilter
public ItemTagFilter(net.minecraft.tag.Tag<net.minecraft.item.Item> tag)
-
-
Method Details
-
resolve
Description copied from interface:ResolvableItemFilter
Resolves thisReadableItemFilter
. Note that this must return one of the valid types ofReadableItemFilter
, 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 interfaceResolvableItemFilter
-