Record Class PlainTextFunction<T>
java.lang.Object
java.lang.Record
net.minecraft.commands.functions.PlainTextFunction<T>
- All Implemented Interfaces:
CommandFunction<T>, InstantiatedFunction<T>
public record PlainTextFunction<T>(Identifier id, List<UnboundEntryAction<T>> entries)
extends Record
implements CommandFunction<T>, InstantiatedFunction<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<UnboundEntryAction<T>> The field for theentriesrecord component.private final IdentifierThe field for theidrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPlainTextFunction(Identifier id, List<UnboundEntryAction<T>> entries) Creates an instance of aPlainTextFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionentries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.instantiate(@Nullable CompoundTag arguments, com.mojang.brigadier.CommandDispatcher<T> dispatcher) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
id
The field for theidrecord component. -
entries
The field for theentriesrecord component.
-
-
Constructor Details
-
PlainTextFunction
Creates an instance of aPlainTextFunctionrecord class.- Parameters:
id- the value for theidrecord componententries- the value for theentriesrecord component
-
-
Method Details
-
instantiate
public InstantiatedFunction<T> instantiate(@Nullable CompoundTag arguments, com.mojang.brigadier.CommandDispatcher<T> dispatcher) throws FunctionInstantiationException - Specified by:
instantiatein interfaceCommandFunction<T>- Throws:
FunctionInstantiationException
-
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). -
id
Returns the value of theidrecord component.- Specified by:
idin interfaceCommandFunction<T>- Specified by:
idin interfaceInstantiatedFunction<T>- Returns:
- the value of the
idrecord component
-
entries
Returns the value of theentriesrecord component.- Specified by:
entriesin interfaceInstantiatedFunction<T>- Returns:
- the value of the
entriesrecord component
-