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 SummaryFieldsModifier and TypeFieldDescriptionprivate final Predicate<EntitySelectorParser>The field for thecanUserecord component.private final ComponentThe field for thedescriptionrecord component.private final EntitySelectorOptions.ModifierThe field for themodifierrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionOption(EntitySelectorOptions.Modifier modifier, Predicate<EntitySelectorParser> canUse, Component description) Creates an instance of aOptionrecord class.
- 
Method SummaryModifier and TypeMethodDescriptioncanUse()Returns the value of thecanUserecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.modifier()Returns the value of themodifierrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
modifierThe field for themodifierrecord component.
- 
canUseThe field for thecanUserecord component.
- 
descriptionThe field for thedescriptionrecord component.
 
- 
- 
Constructor Details- 
OptionOption(EntitySelectorOptions.Modifier modifier, Predicate<EntitySelectorParser> canUse, Component description) Creates an instance of aOptionrecord class.- Parameters:
- modifier- the value for the- modifierrecord component
- canUse- the value for the- canUserecord component
- description- the value for the- descriptionrecord component
 
 
- 
- 
Method Details- 
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).
- 
modifierReturns the value of themodifierrecord component.- Returns:
- the value of the modifierrecord component
 
- 
canUseReturns the value of thecanUserecord component.- Returns:
- the value of the canUserecord component
 
- 
descriptionReturns the value of thedescriptionrecord component.- Returns:
- the value of the descriptionrecord component
 
 
-