Record Class CustomRegistryArgument.Info.ArgumentTemplate<T>
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.command.CustomRegistryArgument.Info.ArgumentTemplate<T>
- All Implemented Interfaces:
net.minecraft.commands.synchronization.ArgumentTypeInfo.Template<CustomRegistryArgument<T>>
- Enclosing class:
CustomRegistryArgument.Info<T>
public static record CustomRegistryArgument.Info.ArgumentTemplate<T>(CustomRegistryArgument.Info<T> info, CustomRegistry<?,T> registry)
extends Record
implements net.minecraft.commands.synchronization.ArgumentTypeInfo.Template<CustomRegistryArgument<T>>
-
Constructor Summary
ConstructorsConstructorDescriptionArgumentTemplate(CustomRegistryArgument.Info<T> info, CustomRegistry<?, T> registry) Creates an instance of aArgumentTemplaterecord 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.info()Returns the value of theinforecord component.instantiate(net.minecraft.commands.CommandBuildContext ctx) CustomRegistry<?, T> registry()Returns the value of theregistryrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.commands.synchronization.ArgumentTypeInfo<CustomRegistryArgument<T>, ?> type()
-
Constructor Details
-
ArgumentTemplate
Creates an instance of aArgumentTemplaterecord class.- Parameters:
info- the value for theinforecord componentregistry- the value for theregistryrecord component
-
-
Method Details
-
instantiate
- Specified by:
instantiatein interfacenet.minecraft.commands.synchronization.ArgumentTypeInfo.Template<T>
-
type
- Specified by:
typein interfacenet.minecraft.commands.synchronization.ArgumentTypeInfo.Template<T>
-
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). -
info
Returns the value of theinforecord component.- Returns:
- the value of the
inforecord component
-
registry
Returns the value of theregistryrecord component.- Returns:
- the value of the
registryrecord component
-