Class CommandSuggestionHelper

java.lang.Object
net.minecraft.client.gui.CommandSuggestionHelper

public class CommandSuggestionHelper 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

      private final Minecraft minecraft
    • screen

      private final Screen screen
    • input

      private final TextFieldWidget input
    • font

      private final FontRenderer font
    • commandsOnly

      private final boolean commandsOnly
    • onlyShowIfCursorPastError

      private final boolean onlyShowIfCursorPastError
    • lineStartOffset

      private final int lineStartOffset
    • suggestionLineLimit

      private final int suggestionLineLimit
    • anchorToBottom

      private final boolean anchorToBottom
    • fillColor

      private final int fillColor
    • commandUsage

      private final List<IReorderingProcessor> commandUsage
    • commandUsagePosition

      private int commandUsagePosition
    • commandUsageWidth

      private int commandUsageWidth
    • currentParse

      private com.mojang.brigadier.ParseResults<ISuggestionProvider> currentParse
    • pendingSuggestions

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

    • allowSuggestions

      private boolean allowSuggestions
    • keepSuggestions

      private boolean keepSuggestions
  • Constructor Details

    • CommandSuggestionHelper

      public CommandSuggestionHelper(Minecraft p_i225919_1_, Screen p_i225919_2_, TextFieldWidget p_i225919_3_, FontRenderer p_i225919_4_, boolean p_i225919_5_, boolean p_i225919_6_, int p_i225919_7_, int p_i225919_8_, boolean p_i225919_9_, int p_i225919_10_)
  • Method Details

    • setAllowSuggestions

      public void setAllowSuggestions(boolean p_228124_1_)
    • keyPressed

      public boolean keyPressed(int p_228115_1_, int p_228115_2_, int p_228115_3_)
    • mouseScrolled

      public boolean mouseScrolled(double p_228112_1_)
    • mouseClicked

      public boolean mouseClicked(double p_228113_1_, double p_228113_3_, int p_228113_5_)
    • showSuggestions

      public void showSuggestions(boolean p_228128_1_)
    • sortSuggestions

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

      public void updateCommandInfo()
    • getLastWordIndex

      private static int getLastWordIndex(String p_228121_0_)
    • getExceptionMessage

      private static IReorderingProcessor getExceptionMessage(com.mojang.brigadier.exceptions.CommandSyntaxException p_243255_0_)
    • updateUsageInfo

      private void updateUsageInfo()
    • fillNodeUsage

      private void fillNodeUsage(TextFormatting p_228120_1_)
    • formatChat

      private IReorderingProcessor formatChat(String p_228122_1_, int p_228122_2_)
    • calculateSuggestionSuffix

      @Nullable private static String calculateSuggestionSuffix(String p_228127_0_, String p_228127_1_)
    • formatText

      private static IReorderingProcessor formatText(com.mojang.brigadier.ParseResults<ISuggestionProvider> p_228116_0_, String p_228116_1_, int p_228116_2_)
    • render

      public void render(MatrixStack p_238500_1_, int p_238500_2_, int p_238500_3_)
    • getNarrationMessage

      public String getNarrationMessage()