Record Class EntitySelectorOptions.Option
java.lang.Object
java.lang.Record
net.minecraft.commands.arguments.selector.options.EntitySelectorOptions.Option
- Enclosing class:
EntitySelectorOptions
static record EntitySelectorOptions.Option(EntitySelectorOptions.Modifier modifier, Predicate<EntitySelectorParser> canUse, Component description)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Predicate
<EntitySelectorParser> The field for thecanUse
record component.private final Component
The field for thedescription
record component.private final EntitySelectorOptions.Modifier
The field for themodifier
record component. -
Constructor Summary
ConstructorDescriptionOption
(EntitySelectorOptions.Modifier modifier, Predicate<EntitySelectorParser> canUse, Component description) Creates an instance of aOption
record class. -
Method Summary
Modifier and TypeMethodDescriptioncanUse()
Returns the value of thecanUse
record component.Returns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.modifier()
Returns the value of themodifier
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
modifier
The field for themodifier
record component. -
canUse
The field for thecanUse
record component. -
description
The field for thedescription
record component.
-
-
Constructor Details
-
Option
Option(EntitySelectorOptions.Modifier modifier, Predicate<EntitySelectorParser> canUse, Component description) Creates an instance of aOption
record class.- Parameters:
modifier
- the value for themodifier
record componentcanUse
- the value for thecanUse
record componentdescription
- the value for thedescription
record 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)
. -
modifier
Returns the value of themodifier
record component.- Returns:
- the value of the
modifier
record component
-
canUse
Returns the value of thecanUse
record component.- Returns:
- the value of the
canUse
record component
-
description
Returns the value of thedescription
record component.- Returns:
- the value of the
description
record component
-