Record Class WhenCondition
java.lang.Object
java.lang.Record
cromveil.combatnumbers.styles.WhenCondition
public record WhenCondition(@Nullable net.minecraft.resources.Identifier type, List<net.minecraft.resources.Identifier> tags, List<net.minecraft.resources.Identifier> flags, @Nullable net.minecraft.advancements.predicates.entity.EntityPredicate attacker, @Nullable net.minecraft.advancements.predicates.entity.EntityPredicate target, @Nullable net.minecraft.advancements.predicates.ItemPredicate weapon)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWhenCondition(@Nullable net.minecraft.resources.Identifier type, List<net.minecraft.resources.Identifier> tags, List<net.minecraft.resources.Identifier> flags, @Nullable net.minecraft.advancements.predicates.entity.EntityPredicate attacker, @Nullable net.minecraft.advancements.predicates.entity.EntityPredicate target, @Nullable net.minecraft.advancements.predicates.ItemPredicate weapon) Creates an instance of aWhenConditionrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable net.minecraft.advancements.predicates.entity.EntityPredicateattacker()Returns the value of theattackerrecord component.final booleanIndicates whether some other object is "equal to" this one.List<net.minecraft.resources.Identifier> flags()Returns the value of theflagsrecord component.final inthashCode()Returns a hash code value for this object.booleanmatches(CombatEvent event) intList<net.minecraft.resources.Identifier> tags()Returns the value of thetagsrecord component.@Nullable net.minecraft.advancements.predicates.entity.EntityPredicatetarget()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.@Nullable net.minecraft.resources.Identifiertype()Returns the value of thetyperecord component.@Nullable net.minecraft.advancements.predicates.ItemPredicateweapon()Returns the value of theweaponrecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
WhenCondition
public WhenCondition(@Nullable net.minecraft.resources.Identifier type, List<net.minecraft.resources.Identifier> tags, List<net.minecraft.resources.Identifier> flags, @Nullable net.minecraft.advancements.predicates.entity.EntityPredicate attacker, @Nullable net.minecraft.advancements.predicates.entity.EntityPredicate target, @Nullable net.minecraft.advancements.predicates.ItemPredicate weapon) Creates an instance of aWhenConditionrecord class.- Parameters:
type- the value for thetyperecord componenttags- the value for thetagsrecord componentflags- the value for theflagsrecord componentattacker- the value for theattackerrecord componenttarget- the value for thetargetrecord componentweapon- the value for theweaponrecord component
-
-
Method Details
-
matches
-
specificity
public int specificity() -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
type
public @Nullable net.minecraft.resources.Identifier type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
tags
Returns the value of thetagsrecord component.- Returns:
- the value of the
tagsrecord component
-
flags
Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-
attacker
public @Nullable net.minecraft.advancements.predicates.entity.EntityPredicate attacker()Returns the value of theattackerrecord component.- Returns:
- the value of the
attackerrecord component
-
target
public @Nullable net.minecraft.advancements.predicates.entity.EntityPredicate target()Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
weapon
public @Nullable net.minecraft.advancements.predicates.ItemPredicate weapon()Returns the value of theweaponrecord component.- Returns:
- the value of the
weaponrecord component
-