Record Class EntityEquipmentPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.EntityEquipmentPredicate
public record EntityEquipmentPredicate(Optional<ItemPredicate> head, Optional<ItemPredicate> chest, Optional<ItemPredicate> legs, Optional<ItemPredicate> feet, Optional<ItemPredicate> mainhand, Optional<ItemPredicate> offhand)
extends Record
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final EntityEquipmentPredicateprivate final Optional<ItemPredicate>The field for thechestrecord component.static final com.mojang.serialization.Codec<EntityEquipmentPredicate>private final Optional<ItemPredicate>The field for thefeetrecord component.private final Optional<ItemPredicate>The field for theheadrecord component.private final Optional<ItemPredicate>The field for thelegsrecord component.private final Optional<ItemPredicate>The field for themainhandrecord component.private final Optional<ItemPredicate>The field for theoffhandrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionEntityEquipmentPredicate(Optional<ItemPredicate> head, Optional<ItemPredicate> chest, Optional<ItemPredicate> legs, Optional<ItemPredicate> feet, Optional<ItemPredicate> mainhand, Optional<ItemPredicate> offhand) Creates an instance of aEntityEquipmentPredicaterecord class.
- 
Method SummaryModifier and TypeMethodDescriptionchest()Returns the value of thechestrecord component.final booleanIndicates whether some other object is "equal to" this one.feet()Returns the value of thefeetrecord component.final inthashCode()Returns a hash code value for this object.head()Returns the value of theheadrecord component.legs()Returns the value of thelegsrecord component.mainhand()Returns the value of themainhandrecord component.booleanoffhand()Returns the value of theoffhandrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
headThe field for theheadrecord component.
- 
chestThe field for thechestrecord component.
- 
legsThe field for thelegsrecord component.
- 
feetThe field for thefeetrecord component.
- 
mainhandThe field for themainhandrecord component.
- 
offhandThe field for theoffhandrecord component.
- 
CODEC
- 
CAPTAIN
 
- 
- 
Constructor Details- 
EntityEquipmentPredicatepublic EntityEquipmentPredicate(Optional<ItemPredicate> head, Optional<ItemPredicate> chest, Optional<ItemPredicate> legs, Optional<ItemPredicate> feet, Optional<ItemPredicate> mainhand, Optional<ItemPredicate> offhand) Creates an instance of aEntityEquipmentPredicaterecord class.- Parameters:
- head- the value for the- headrecord component
- chest- the value for the- chestrecord component
- legs- the value for the- legsrecord component
- feet- the value for the- feetrecord component
- mainhand- the value for the- mainhandrecord component
- offhand- the value for the- offhandrecord component
 
 
- 
- 
Method Details- 
matches
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates 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).
- 
headReturns the value of theheadrecord component.- Returns:
- the value of the headrecord component
 
- 
chestReturns the value of thechestrecord component.- Returns:
- the value of the chestrecord component
 
- 
legsReturns the value of thelegsrecord component.- Returns:
- the value of the legsrecord component
 
- 
feetReturns the value of thefeetrecord component.- Returns:
- the value of the feetrecord component
 
- 
mainhandReturns the value of themainhandrecord component.- Returns:
- the value of the mainhandrecord component
 
- 
offhandReturns the value of theoffhandrecord component.- Returns:
- the value of the offhandrecord component
 
 
-