Record Class EntityFlagsPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.EntityFlagsPredicate
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<EntityFlagsPredicate> The field for theisBaby
record component.The field for theisCrouching
record component.The field for theisOnFire
record component.The field for theisSprinting
record component.The field for theisSwimming
record component. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.isBaby()
Returns the value of theisBaby
record component.Returns the value of theisCrouching
record component.isOnFire()
Returns the value of theisOnFire
record component.Returns the value of theisSprinting
record component.Returns the value of theisSwimming
record component.boolean
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
isOnFire
The field for theisOnFire
record component. -
isCrouching
The field for theisCrouching
record component. -
isSprinting
The field for theisSprinting
record component. -
isSwimming
The field for theisSwimming
record component. -
isBaby
The field for theisBaby
record component. -
CODEC
-
-
Constructor Details
-
EntityFlagsPredicate
public EntityFlagsPredicate(Optional<Boolean> isOnFire, Optional<Boolean> isCrouching, Optional<Boolean> isSprinting, Optional<Boolean> isSwimming, Optional<Boolean> isBaby) Creates an instance of aEntityFlagsPredicate
record class.- Parameters:
isOnFire
- the value for theisOnFire
record componentisCrouching
- the value for theisCrouching
record componentisSprinting
- the value for theisSprinting
record componentisSwimming
- the value for theisSwimming
record componentisBaby
- the value for theisBaby
record component
-
-
Method Details
-
matches
-
toString
Returns 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. -
hashCode
public 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. -
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)
. -
isOnFire
Returns the value of theisOnFire
record component.- Returns:
- the value of the
isOnFire
record component
-
isCrouching
Returns the value of theisCrouching
record component.- Returns:
- the value of the
isCrouching
record component
-
isSprinting
Returns the value of theisSprinting
record component.- Returns:
- the value of the
isSprinting
record component
-
isSwimming
Returns the value of theisSwimming
record component.- Returns:
- the value of the
isSwimming
record component
-
isBaby
Returns the value of theisBaby
record component.- Returns:
- the value of the
isBaby
record component
-