Package net.minecraft.commands.functions
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>(ResourceLocation id, List<UnboundEntryAction<T>> entries)
extends Record
implements CommandFunction<T>, InstantiatedFunction<T>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final List<UnboundEntryAction<T>>The field for theentriesrecord component.private final ResourceLocationThe field for theidrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionPlainTextFunction(ResourceLocation id, List<UnboundEntryAction<T>> entries) Creates an instance of aPlainTextFunctionrecord class.
- 
Method SummaryModifier 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(CompoundTag p_306181_, com.mojang.brigadier.CommandDispatcher<T> p_306210_, T p_306227_) final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
idThe field for theidrecord component.
- 
entriesThe field for theentriesrecord component.
 
- 
- 
Constructor Details- 
PlainTextFunctionCreates an instance of aPlainTextFunctionrecord class.- Parameters:
- id- the value for the- idrecord component
- entries- the value for the- entriesrecord component
 
 
- 
- 
Method Details- 
instantiatepublic InstantiatedFunction<T> instantiate(@Nullable CompoundTag p_306181_, com.mojang.brigadier.CommandDispatcher<T> p_306210_, T p_306227_) throws FunctionInstantiationException - Specified by:
- instantiatein interface- CommandFunction<T>
- Throws:
- FunctionInstantiationException
 
- 
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).
- 
idReturns the value of theidrecord component.- Specified by:
- idin interface- CommandFunction<T>
- Specified by:
- idin interface- InstantiatedFunction<T>
- Returns:
- the value of the idrecord component
 
- 
entriesReturns the value of theentriesrecord component.- Specified by:
- entriesin interface- InstantiatedFunction<T>
- Returns:
- the value of the entriesrecord component
 
 
-