public class ItemPredicate
extends java.lang.Object
implements net.kyori.examination.Examinable
| Modifier and Type | Method and Description |
|---|---|
static ItemPredicate |
angle(float angle)
Used on compasses to determine the current angle,
expressed in a decimal value of less than one
|
static ItemPredicate |
blocking()
Used on shields to determine if currently blocking.
|
static ItemPredicate |
broken()
Used on Elytra to determine if broken
|
static ItemPredicate |
cast()
Used on fishing rods to determine if the fishing rod
has been cast
|
static ItemPredicate |
charged()
Used on crossbows to determine if they are charged with any projectile
|
static ItemPredicate |
cooldown(float cooldown)
Used on ender pearls and chorus fruit to determine the
remaining cooldown, expressed in a decimal value between
0 and 1
|
static ItemPredicate |
custom(java.lang.String name,
java.lang.Object value)
Creates a custom
ItemPredicate instance with
the provided name and value |
static ItemPredicate |
customModelData(int data)
Used on any item and is compared to the tag.CustomModelData NBT,
expressed in an integer value.
|
static ItemPredicate |
damage(float damage)
Used on items with durability to determine the amount of
damage, expressed in a decimal value between 0 and 1
|
static ItemPredicate |
damaged()
Used on items with durability to determine if it is damaged
|
boolean |
equals(java.lang.Object o) |
@NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty> |
examinableProperties() |
static ItemPredicate |
firework()
Used on crossbows to determine if it is charged with a
firework rocket
|
int |
hashCode() |
static ItemPredicate |
lefthanded()
Determines the model used by left-handed players.
|
java.lang.String |
name()
Returns the name of this item predicate,
e.g.
|
static ItemPredicate |
pull(float pull)
Determines the amount a bow or crossbow has been pulled, expressed
in a decimal value of less than one.
|
static ItemPredicate |
pulling()
Used on bows and crossbows to determine if the bow is being pulled.
|
static ItemPredicate |
throwing()
Used on the trident to determine if the trident is ready to be thrown
by the player
|
static ItemPredicate |
time(float time)
Used on clocks to determine the current time, expressed in a decimal
value of less than one
|
java.lang.String |
toString() |
java.lang.Object |
value()
Returns the value for this item predicate,
e.g.
|
public java.lang.String name()
public java.lang.Object value()
@NotNull public @NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty> examinableProperties()
examinableProperties in interface net.kyori.examination.Examinablepublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static ItemPredicate angle(float angle)
public static ItemPredicate blocking()
public static ItemPredicate broken()
public static ItemPredicate cast()
public static ItemPredicate cooldown(float cooldown)
public static ItemPredicate damage(float damage)
public static ItemPredicate damaged()
public static ItemPredicate lefthanded()
public static ItemPredicate pull(float pull)
public static ItemPredicate pulling()
public static ItemPredicate charged()
public static ItemPredicate firework()
public static ItemPredicate throwing()
public static ItemPredicate time(float time)
public static ItemPredicate customModelData(int data)
public static ItemPredicate custom(java.lang.String name, java.lang.Object value)
ItemPredicate instance with
the provided name and value