Interface ItemTagLookup

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 ItemTagLookup
Answers whether an item belongs to an item tag, such as minecraft:planks.

The server hands one to every match, so that recipes can accept tags without knowing where tags are stored.

Since:
0.1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ItemTagLookup
    A lookup for which every tag is empty.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
  • Field Details

    • EMPTY

      static final ItemTagLookup EMPTY
      A lookup for which every tag is empty.
      Since:
      0.1.0
  • Method Details

    • isTagged

      boolean isTagged(TagKey<Item> tag, TypedKey<Item> item)
      Parameters:
      tag - the tag, e.g. minecraft:planks, without the leading #
      item - the item identifier
      Returns:
      true when item is a member of tag
      Since:
      0.1.0