Class CommandSuggestionHelper


  • public class CommandSuggestionHelper
    extends java.lang.Object
    • Field Detail

      • WHITESPACE_PATTERN

        private static final java.util.regex.Pattern WHITESPACE_PATTERN
      • UNPARSED_STYLE

        private static final Style UNPARSED_STYLE
      • LITERAL_STYLE

        private static final Style LITERAL_STYLE
      • ARGUMENT_STYLES

        private static final java.util.List<Style> ARGUMENT_STYLES
      • minecraft

        private final Minecraft minecraft
      • screen

        private final Screen screen
      • 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
      • commandUsagePosition

        private int commandUsagePosition
      • commandUsageWidth

        private int commandUsageWidth
      • pendingSuggestions

        private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> pendingSuggestions
      • allowSuggestions

        private boolean allowSuggestions
      • keepSuggestions

        private boolean keepSuggestions
    • Constructor Detail

      • 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 Detail

      • 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 java.util.List<com.mojang.brigadier.suggestion.Suggestion> sortSuggestions​(com.mojang.brigadier.suggestion.Suggestions p_241575_1_)
      • updateCommandInfo

        public void updateCommandInfo()
      • getLastWordIndex

        private static int getLastWordIndex​(java.lang.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​(java.lang.String p_228122_1_,
                                                int p_228122_2_)
      • calculateSuggestionSuffix

        @Nullable
        private static java.lang.String calculateSuggestionSuffix​(java.lang.String p_228127_0_,
                                                                  java.lang.String p_228127_1_)
      • render

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

        public java.lang.String getNarrationMessage()