Class CommandSuggestions

java.lang.Object
net.minecraft.client.gui.components.CommandSuggestions

public class CommandSuggestions extends Object
  • Field Details

    • WHITESPACE_PATTERN

      private static final Pattern WHITESPACE_PATTERN
    • UNPARSED_STYLE

      private static final Style UNPARSED_STYLE
    • LITERAL_STYLE

      private static final Style LITERAL_STYLE
    • ARGUMENT_STYLES

      private static final List<Style> ARGUMENT_STYLES
    • minecraft

      final Minecraft minecraft
    • screen

      private final Screen screen
    • input

      final EditBox input
    • font

      final Font font
    • commandsOnly

      private final boolean commandsOnly
    • onlyShowIfCursorPastError

      private final boolean onlyShowIfCursorPastError
    • lineStartOffset

      final int lineStartOffset
    • suggestionLineLimit

      final int suggestionLineLimit
    • anchorToBottom

      final boolean anchorToBottom
    • fillColor

      final int fillColor
    • commandUsage

      private final List<FormattedCharSequence> commandUsage
    • commandUsagePosition

      private int commandUsagePosition
    • commandUsageWidth

      private int commandUsageWidth
    • currentParse

      @Nullable private com.mojang.brigadier.ParseResults<SharedSuggestionProvider> currentParse
    • pendingSuggestions

      @Nullable private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> pendingSuggestions
    • suggestions

      @Nullable private CommandSuggestions.SuggestionsList suggestions
    • allowSuggestions

      private boolean allowSuggestions
    • keepSuggestions

      boolean keepSuggestions
  • Constructor Details

    • CommandSuggestions

      public CommandSuggestions(Minecraft p_93871_, Screen p_93872_, EditBox p_93873_, Font p_93874_, boolean p_93875_, boolean p_93876_, int p_93877_, int p_93878_, boolean p_93879_, int p_93880_)
  • Method Details

    • setAllowSuggestions

      public void setAllowSuggestions(boolean p_93923_)
    • keyPressed

      public boolean keyPressed(int p_93889_, int p_93890_, int p_93891_)
    • mouseScrolled

      public boolean mouseScrolled(double p_93883_)
    • mouseClicked

      public boolean mouseClicked(double p_93885_, double p_93886_, int p_93887_)
    • showSuggestions

      public void showSuggestions(boolean p_93931_)
    • hide

      public void hide()
    • sortSuggestions

      private List<com.mojang.brigadier.suggestion.Suggestion> sortSuggestions(com.mojang.brigadier.suggestion.Suggestions p_93899_)
    • updateCommandInfo

      public void updateCommandInfo()
    • getLastWordIndex

      private static int getLastWordIndex(String p_93913_)
    • getExceptionMessage

      private static FormattedCharSequence getExceptionMessage(com.mojang.brigadier.exceptions.CommandSyntaxException p_93897_)
    • updateUsageInfo

      private void updateUsageInfo()
    • fillNodeUsage

      private boolean fillNodeUsage(ChatFormatting p_289002_)
    • formatChat

      private FormattedCharSequence formatChat(String p_93915_, int p_93916_)
    • calculateSuggestionSuffix

      @Nullable static String calculateSuggestionSuffix(String p_93928_, String p_93929_)
    • formatText

      private static FormattedCharSequence formatText(com.mojang.brigadier.ParseResults<SharedSuggestionProvider> p_93893_, String p_93894_, int p_93895_)
    • render

      public void render(GuiGraphics p_282650_, int p_282266_, int p_281963_)
    • renderSuggestions

      public boolean renderSuggestions(GuiGraphics p_283503_, int p_281628_, int p_282260_)
    • renderUsage

      public void renderUsage(GuiGraphics p_282763_)
    • getNarrationMessage

      public Component getNarrationMessage()