Record Class SlotSourceArgument.HolderResult
java.lang.Object
java.lang.Record
net.minecraft.commands.arguments.SlotSourceArgument.HolderResult
- All Implemented Interfaces:
SlotSourceArgument.Result
- Enclosing class:
SlotSourceArgument
public static record SlotSourceArgument.HolderResult(Holder<SlotSource> holder)
extends Record
implements SlotSourceArgument.Result
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Holder<SlotSource> The field for theholderrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionHolderResult(Holder<SlotSource> holder) Creates an instance of aHolderResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.holder()Returns the value of theholderrecord component.name()final StringtoString()Returns a string representation of this record class.value()
-
Field Details
-
holder
The field for theholderrecord component.
-
-
Constructor Details
-
HolderResult
Creates an instance of aHolderResultrecord class.- Parameters:
holder- the value for theholderrecord component
-
-
Method Details
-
value
- Specified by:
valuein interfaceSlotSourceArgument.Result
-
name
- Specified by:
namein interfaceSlotSourceArgument.Result
-
toString
-
hashCode
-
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). -
holder
Returns the value of theholderrecord component.- Returns:
- the value of the
holderrecord component
-