Record Class SuggestionProviders.LocalProvider

java.lang.Object
java.lang.Record
net.minecraft.command.suggestion.SuggestionProviders.LocalProvider
Record Components:
id -
provider -
All Implemented Interfaces:
com.mojang.brigadier.suggestion.SuggestionProvider<CommandSource>
Enclosing class:
SuggestionProviders

private static record SuggestionProviders.LocalProvider(Identifier id, com.mojang.brigadier.suggestion.SuggestionProvider<CommandSource> provider) extends Record implements com.mojang.brigadier.suggestion.SuggestionProvider<CommandSource>
Mappings:
Namespace Name
named net/minecraft/command/suggestion/SuggestionProviders$LocalProvider
intermediary net/minecraft/class_2321$class_2322
official ip$a
named id
intermediary comp_4376
official a
named provider
intermediary comp_4377
official b
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Identifier
    The field for the id record component.
    private final com.mojang.brigadier.suggestion.SuggestionProvider<CommandSource>
    The field for the provider record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LocalProvider(Identifier identifier, com.mojang.brigadier.suggestion.SuggestionProvider<CommandSource> suggestionProvider)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    equals(Object object)
    Indicates whether some other object is "equal to" this one.
    CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
    getSuggestions(com.mojang.brigadier.context.CommandContext<CommandSource> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
     
    final int
    Returns a hash code value for this object.
    id()
    Returns the value of the id record component.
    com.mojang.brigadier.suggestion.SuggestionProvider<CommandSource>
    Returns the value of the provider record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • id

      private final Identifier id
      The field for the id record component.
    • provider

      private final com.mojang.brigadier.suggestion.SuggestionProvider<CommandSource> provider
      The field for the provider record component.
  • Constructor Details

    • LocalProvider

      LocalProvider(Identifier identifier, com.mojang.brigadier.suggestion.SuggestionProvider<CommandSource> suggestionProvider)
  • Method Details

    • getSuggestions

      public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> getSuggestions(com.mojang.brigadier.context.CommandContext<CommandSource> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      getSuggestions in interface com.mojang.brigadier.suggestion.SuggestionProvider<CommandSource>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named getSuggestions Lnet/minecraft/command/suggestion/SuggestionProviders$LocalProvider;getSuggestions(Lcom/mojang/brigadier/context/CommandContext;Lcom/mojang/brigadier/suggestion/SuggestionsBuilder;)Ljava/util/concurrent/CompletableFuture;
      intermediary getSuggestions Lnet/minecraft/class_2321$class_2322;getSuggestions(Lcom/mojang/brigadier/context/CommandContext;Lcom/mojang/brigadier/suggestion/SuggestionsBuilder;)Ljava/util/concurrent/CompletableFuture;
      official getSuggestions Lip$a;getSuggestions(Lcom/mojang/brigadier/context/CommandContext;Lcom/mojang/brigadier/suggestion/SuggestionsBuilder;)Ljava/util/concurrent/CompletableFuture;
    • toString

      public final String toString()
      Returns 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • id

      public Identifier id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • provider

      public com.mojang.brigadier.suggestion.SuggestionProvider<CommandSource> provider()
      Returns the value of the provider record component.
      Returns:
      the value of the provider record component