Record Class EntityFlagsPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.EntityFlagsPredicate
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<EntityFlagsPredicate>The field for theisBabyrecord component.The field for theisCrouchingrecord component.The field for theisOnFirerecord component.The field for theisSprintingrecord component.The field for theisSwimmingrecord component.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.isBaby()Returns the value of theisBabyrecord component.Returns the value of theisCrouchingrecord component.isOnFire()Returns the value of theisOnFirerecord component.Returns the value of theisSprintingrecord component.Returns the value of theisSwimmingrecord component.booleanfinal StringtoString()Returns a string representation of this record class.
- 
Field Details- 
isOnFireThe field for theisOnFirerecord component.
- 
isCrouchingThe field for theisCrouchingrecord component.
- 
isSprintingThe field for theisSprintingrecord component.
- 
isSwimmingThe field for theisSwimmingrecord component.
- 
isBabyThe field for theisBabyrecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
EntityFlagsPredicatepublic EntityFlagsPredicate(Optional<Boolean> isOnFire, Optional<Boolean> isCrouching, Optional<Boolean> isSprinting, Optional<Boolean> isSwimming, Optional<Boolean> isBaby) Creates an instance of aEntityFlagsPredicaterecord class.- Parameters:
- isOnFire- the value for the- isOnFirerecord component
- isCrouching- the value for the- isCrouchingrecord component
- isSprinting- the value for the- isSprintingrecord component
- isSwimming- the value for the- isSwimmingrecord component
- isBaby- the value for the- isBabyrecord 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).
- 
isOnFireReturns the value of theisOnFirerecord component.- Returns:
- the value of the isOnFirerecord component
 
- 
isCrouchingReturns the value of theisCrouchingrecord component.- Returns:
- the value of the isCrouchingrecord component
 
- 
isSprintingReturns the value of theisSprintingrecord component.- Returns:
- the value of the isSprintingrecord component
 
- 
isSwimmingReturns the value of theisSwimmingrecord component.- Returns:
- the value of the isSwimmingrecord component
 
- 
isBabyReturns the value of theisBabyrecord component.- Returns:
- the value of the isBabyrecord component
 
 
-