Class TagsHelper

java.lang.Object
com.pixelmonmod.pixelmon.api.tags.TagsHelper

public class TagsHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    allMatch(Collection<net.minecraft.core.Holder<?>> holder, Collection<net.minecraft.tags.TagEntry> entries)
    Checks if all the holders match any of the tag entries given
    static <T> boolean
    allMatch(Collection<T> values, Function<T,net.minecraft.core.Holder<T>> conversion, Collection<net.minecraft.tags.TagEntry> entries)
    Checks if all the holders match any of the tag entries given
    static boolean
    is(net.minecraft.core.Holder<?> holder, Collection<net.minecraft.tags.TagEntry> entries)
    Checks if the holder matches any of the tag entries given
    static boolean
    is(net.minecraft.core.Holder<?> holder, net.minecraft.tags.TagEntry... entries)
    Checks if the holder matches any of the tag entries given

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TagsHelper

      public TagsHelper()
  • Method Details

    • is

      public static boolean is(net.minecraft.core.Holder<?> holder, net.minecraft.tags.TagEntry... entries)
      Checks if the holder matches any of the tag entries given
      Parameters:
      holder - The holder
      entries - The tag entries
      Returns:
      True if a match is found
    • is

      public static boolean is(net.minecraft.core.Holder<?> holder, Collection<net.minecraft.tags.TagEntry> entries)
      Checks if the holder matches any of the tag entries given
      Parameters:
      holder - The holder
      entries - The tag entries
      Returns:
      True if a match is found
    • allMatch

      public static boolean allMatch(Collection<net.minecraft.core.Holder<?>> holder, Collection<net.minecraft.tags.TagEntry> entries)
      Checks if all the holders match any of the tag entries given
      Parameters:
      holder - The holders
      entries - The tag entries
      Returns:
      True if all match at least one tag
    • allMatch

      public static <T> boolean allMatch(Collection<T> values, Function<T,net.minecraft.core.Holder<T>> conversion, Collection<net.minecraft.tags.TagEntry> entries)
      Checks if all the holders match any of the tag entries given
      Parameters:
      values - The values
      conversion - Converts the values into Holders
      entries - The tag entries
      Returns:
      True if all match at least one tag