Package net.minecraft.client.gui
Class CommandSuggestionHelper
- java.lang.Object
-
- net.minecraft.client.gui.CommandSuggestionHelper
-
public class CommandSuggestionHelper extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
CommandSuggestionHelper.Suggestions
-
Field Summary
Fields Modifier and Type Field Description private boolean
allowSuggestions
private boolean
anchorToBottom
private static java.util.List<Style>
ARGUMENT_STYLES
private boolean
commandsOnly
private java.util.List<IReorderingProcessor>
commandUsage
private int
commandUsagePosition
private int
commandUsageWidth
private com.mojang.brigadier.ParseResults<ISuggestionProvider>
currentParse
private int
fillColor
private FontRenderer
font
private TextFieldWidget
input
private boolean
keepSuggestions
private int
lineStartOffset
private static Style
LITERAL_STYLE
private Minecraft
minecraft
private boolean
onlyShowIfCursorPastError
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
pendingSuggestions
private Screen
screen
private int
suggestionLineLimit
private CommandSuggestionHelper.Suggestions
suggestions
private static Style
UNPARSED_STYLE
private static java.util.regex.Pattern
WHITESPACE_PATTERN
-
Constructor Summary
Constructors Constructor Description 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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
calculateSuggestionSuffix(java.lang.String p_228127_0_, java.lang.String p_228127_1_)
private void
fillNodeUsage(TextFormatting p_228120_1_)
private IReorderingProcessor
formatChat(java.lang.String p_228122_1_, int p_228122_2_)
private static IReorderingProcessor
formatText(com.mojang.brigadier.ParseResults<ISuggestionProvider> p_228116_0_, java.lang.String p_228116_1_, int p_228116_2_)
private static IReorderingProcessor
getExceptionMessage(com.mojang.brigadier.exceptions.CommandSyntaxException p_243255_0_)
private static int
getLastWordIndex(java.lang.String p_228121_0_)
java.lang.String
getNarrationMessage()
boolean
keyPressed(int p_228115_1_, int p_228115_2_, int p_228115_3_)
boolean
mouseClicked(double p_228113_1_, double p_228113_3_, int p_228113_5_)
boolean
mouseScrolled(double p_228112_1_)
void
render(MatrixStack p_238500_1_, int p_238500_2_, int p_238500_3_)
void
setAllowSuggestions(boolean p_228124_1_)
void
showSuggestions(boolean p_228128_1_)
private java.util.List<com.mojang.brigadier.suggestion.Suggestion>
sortSuggestions(com.mojang.brigadier.suggestion.Suggestions p_241575_1_)
void
updateCommandInfo()
private void
updateUsageInfo()
-
-
-
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
-
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 java.util.List<IReorderingProcessor> commandUsage
-
commandUsagePosition
private int commandUsagePosition
-
commandUsageWidth
private int commandUsageWidth
-
currentParse
private com.mojang.brigadier.ParseResults<ISuggestionProvider> currentParse
-
pendingSuggestions
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> pendingSuggestions
-
suggestions
private CommandSuggestionHelper.Suggestions suggestions
-
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_)
-
formatText
private static IReorderingProcessor formatText(com.mojang.brigadier.ParseResults<ISuggestionProvider> p_228116_0_, java.lang.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 java.lang.String getNarrationMessage()
-
-