Interface ItemMatchPredicate
- All Superinterfaces:
MatchPredicate
Contains factories for often-used "match" predicates, that match for a value in
ItemPredicateContext.
Predicates created through these factories support conflict detection when used with custom items. It is as such preferred to use these over custom defined predicates when possible.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionchargeType(@NonNull ChargedProjectile.ChargeType type) Creates a predicate matching the item's charged projectile.customModelData(@org.checkerframework.checker.index.qual.NonNegative int index, @Nullable String string) Creates a predicate matching a string of the item's custom model data strings.trimMaterial(@NonNull Identifier material) Creates a predicate matching the item's trim material identifier.
-
Method Details
-
chargeType
static MinecraftPredicate<ItemPredicateContext> chargeType(@NonNull ChargedProjectile.ChargeType type) Creates a predicate matching the item's charged projectile. Usually used with crossbows, but checks any item with theminecraft:charged_projectilescomponent.- See Also:
-
trimMaterial
Creates a predicate matching the item's trim material identifier. Works for any item with theminecraft:trimcomponent.- See Also:
-
customModelData
static MinecraftPredicate<ItemPredicateContext> customModelData(@org.checkerframework.checker.index.qual.NonNegative int index, @Nullable String string) Creates a predicate matching a string of the item's custom model data strings.- See Also:
-