Package net.minecraft.command
Record Class EntitySelectorOptions.SelectorOption
java.lang.Object
java.lang.Record
net.minecraft.command.EntitySelectorOptions.SelectorOption
- Record Components:
handler-condition-description-
- Enclosing class:
EntitySelectorOptions
private static record EntitySelectorOptions.SelectorOption(EntitySelectorOptions.SelectorHandler handler, Predicate<EntitySelectorReader> condition, Text description)
extends Record
- Mappings:
Namespace Name named net/minecraft/command/EntitySelectorOptions$SelectorOptionintermediary net/minecraft/class_2306$class_2308official hk$bnamed handlerintermediary comp_1063official anamed conditionintermediary comp_1064official bnamed descriptionintermediary comp_1065official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Predicate<EntitySelectorReader> The field for theconditionrecord component.private final TextThe field for thedescriptionrecord component.private final EntitySelectorOptions.SelectorHandlerThe field for thehandlerrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSelectorOption(EntitySelectorOptions.SelectorHandler handler, Predicate<EntitySelectorReader> condition, Text description) Creates an instance of aSelectorOptionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconditionrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.handler()Returns the value of thehandlerrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
handler
The field for thehandlerrecord component. -
condition
The field for theconditionrecord component. -
description
The field for thedescriptionrecord component.
-
-
Constructor Details
-
SelectorOption
SelectorOption(EntitySelectorOptions.SelectorHandler handler, Predicate<EntitySelectorReader> condition, Text description) Creates an instance of aSelectorOptionrecord class.- Parameters:
handler- the value for thehandlerrecord componentcondition- the value for theconditionrecord componentdescription- the value for thedescriptionrecord component
-
-
Method Details
-
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). -
handler
Returns the value of thehandlerrecord component.- Returns:
- the value of the
handlerrecord component
-
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-