Class TagsHelper
java.lang.Object
com.pixelmonmod.pixelmon.api.tags.TagsHelper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 givenstatic <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 givenstatic boolean
is
(net.minecraft.core.Holder<?> holder, Collection<net.minecraft.tags.TagEntry> entries) Checks if the holder matches any of the tag entries givenstatic boolean
is
(net.minecraft.core.Holder<?> holder, net.minecraft.tags.TagEntry... entries) Checks if the holder matches any of the tag entries given
-
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 holderentries
- 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 holderentries
- 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 holdersentries
- 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 valuesconversion
- Converts the values into Holdersentries
- The tag entries- Returns:
- True if all match at least one tag
-