Class CommandSuggestor

java.lang.Object
net.minecraft.client.gui.screen.CommandSuggestor

@Environment(CLIENT)
public class CommandSuggestor
extends Object
  • Field Details

    • BACKSLASH_S_PATTERN

      private static final Pattern BACKSLASH_S_PATTERN
    • field_25885

      private static final Style field_25885
    • field_25886

      private static final Style field_25886
    • field_25887

      private static final List<Style> field_25887
    • client

      private final MinecraftClient client
    • owner

      private final Screen owner
    • textField

      private final TextFieldWidget textField
    • textRenderer

      private final TextRenderer textRenderer
    • slashOptional

      private final boolean slashOptional
    • suggestingWhenEmpty

      private final boolean suggestingWhenEmpty
    • inWindowIndexOffset

      private final int inWindowIndexOffset
    • maxSuggestionSize

      private final int maxSuggestionSize
    • chatScreenSized

      private final boolean chatScreenSized
    • color

      private final int color
    • messages

      private final List<OrderedText> messages
    • x

      private int x
    • width

      private int width
    • parse

      private com.mojang.brigadier.ParseResults<CommandSource> parse
    • pendingSuggestions

      private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> pendingSuggestions
    • window

    • windowActive

      private boolean windowActive
    • completingSuggestions

      private boolean completingSuggestions
  • Constructor Details

    • CommandSuggestor

      public CommandSuggestor​(MinecraftClient client, Screen owner, TextFieldWidget textField, TextRenderer textRenderer, boolean slashRequired, boolean suggestingWhenEmpty, int inWindowIndexOffset, int maxSuggestionSize, boolean chatScreenSized, int color)
  • Method Details

    • setWindowActive

      public void setWindowActive​(boolean windowActive)
    • keyPressed

      public boolean keyPressed​(int keyCode, int scanCode, int modifiers)
    • mouseScrolled

      public boolean mouseScrolled​(double amount)
    • mouseClicked

      public boolean mouseClicked​(double mouseX, double mouseY, int button)
    • showSuggestions

      public void showSuggestions​(boolean narrateFirstSuggestion)
    • method_30104

      private List<com.mojang.brigadier.suggestion.Suggestion> method_30104​(com.mojang.brigadier.suggestion.Suggestions suggestions)
    • refresh

      public void refresh()
    • getLastPlayerNameStart

      private static int getLastPlayerNameStart​(String input)
    • method_30505

      private static OrderedText method_30505​(com.mojang.brigadier.exceptions.CommandSyntaxException commandSyntaxException)
    • show

      private void show()
    • showUsages

      private void showUsages​(Formatting formatting)
    • provideRenderText

      private OrderedText provideRenderText​(String original, int firstCharacterIndex)
    • getSuggestionSuffix

      @Nullable private static String getSuggestionSuffix​(String original, String suggestion)
    • highlight

      private static OrderedText highlight​(com.mojang.brigadier.ParseResults<CommandSource> parse, String original, int firstCharacterIndex)
    • render

      public void render​(MatrixStack matrixStack, int int2, int int3)
    • method_23958

      public String method_23958()