net.minecraft.client.gui.screen

public class ChatInputSuggestor

net.minecraft.client.gui.components.CommandSuggestions
net.minecraft.class_4717
net.minecraft.client.gui.screen.ChatInputSuggestor

Field summary

Modifier and TypeField
private static final Pattern
WHITESPACE_PATTERN
field_21596
WHITESPACE_PATTERN
private static final Style
UNPARSED_STYLE
field_25885
ERROR_STYLE
private static final Style
LITERAL_STYLE
field_25886
INFO_STYLE
public static final Style
USAGE_FORMAT
field_1_1920
SUGGESTION_STYLE
private static final List<Style>
ARGUMENT_STYLES
field_25887
HIGHLIGHT_STYLES
public static final int
LINE_HEIGHT
field_1_1918
field_1_1918
public static final int
USAGE_OFFSET_FROM_BOTTOM
field_1_1921
field_1_1921
private static final Text
COMMANDS_NOT_ALLOWED_TEXT
field_1_1917
COMMANDS_NOT_ALLOWED
private static final Text
MESSAGES_NOT_ALLOWED_TEXT
field_1_1919
MESSAGES_NOT_ALLOWED
private final MinecraftClient
minecraft
field_21597
client
private final Screen
screen
field_21598
owner
private final TextFieldWidget
input
field_21599
textField
private final TextRenderer
font
field_21600
textRenderer
private final boolean
commandsOnly
field_21601
slashOptional
private final boolean
onlyShowIfCursorPastError
field_21602
suggestingWhenEmpty
private final int
lineStartOffset
field_21603
inWindowIndexOffset
private final int
suggestionLineLimit
field_21604
maxSuggestionSize
private final boolean
anchorToBottom
field_21605
chatScreenSized
private final int
fillColor
field_21606
color
private final List<OrderedText>
commandUsage
field_21607
messages
private int
commandUsagePosition
field_21608
x
private int
commandUsageWidth
field_21609
width
private com.mojang.brigadier.ParseResults<ClientCommandSource>
currentParse
field_21610
parse
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
pendingSuggestions
field_21611
pendingSuggestions
private ChatInputSuggestor$SuggestionWindow
suggestions
field_21612
window
private boolean
currentParseIsCommand
field_1_1923
sendingCommand
private boolean
currentParseIsMessage
field_1_1924
sendingMessage
private boolean
allowSuggestions
field_21613
windowActive
private boolean
keepSuggestions
field_21614
completingSuggestions
private boolean
allowHiding
field_46191
canLeave
private boolean
messagesAllowed
field_1_1925
canSendMessages
private boolean
commandsAllowed
field_1_1922
canSendCommands

Constructor summary

ModifierConstructor
public (MinecraftClient client, Screen owner, TextFieldWidget textField, TextRenderer textRenderer, boolean slashOptional, boolean suggestingWhenEmpty, int inWindowIndexOffset, int maxSuggestionSize, boolean chatScreenSized, int color)

Method summary

Modifier and TypeMethod
public void
setAllowSuggestions(boolean allowSuggestions)
method_23933(boolean arg0)
setWindowActive(boolean windowActive)
public void
setAllowHiding(boolean allowHiding)
method_53869(boolean arg0)
setCanLeave(boolean canLeave)
public void
setRestrictions(boolean messagesAllowed, boolean commandsAllowed)
method_1_2348(boolean arg0, boolean arg1)
setSendPermissions(boolean canSendMessages, boolean canSendCommands)
public boolean
keyPressed(KeyEvent event)
method_23924(class_11908 arg0)
keyPressed(KeyInput input)
public boolean
mouseScrolled(double scroll)
method_23921(double arg0)
mouseScrolled(double amount)
public boolean
mouseClicked(MouseButtonEvent event)
method_23922(class_11909 arg0)
mouseClicked(Click click)
public void
showSuggestions(boolean immediateNarration)
method_23920(boolean arg0)
show(boolean narrateFirstSuggestion)
public boolean
isVisible()
method_53867()
isOpen()
public Text
getUsageNarration()
method_53868()
getSuggestionUsageNarrationText()
public void
hide()
method_44931()
clearWindow()
private List<com.mojang.brigadier.suggestion.Suggestion>
sortSuggestions(com.mojang.brigadier.suggestion.Suggestions suggestions)
method_30104(com.mojang.brigadier.suggestion.Suggestions arg0)
sortSuggestions(com.mojang.brigadier.suggestion.Suggestions suggestions)
public void
updateCommandInfo()
method_23934()
refresh()
private static boolean
hasMessageArguments(com.mojang.brigadier.ParseResults<ClientSuggestionProvider> parseResults)
method_1_2346(com.mojang.brigadier.ParseResults<class_637> arg0)
containsMessageArgument(com.mojang.brigadier.ParseResults<ClientCommandSource> parse)
private static int
getLastWordIndex(String text)
method_23930(String arg0)
getStartOfCurrentWord(String input)
private static OrderedText
getExceptionMessage(com.mojang.brigadier.exceptions.CommandSyntaxException e)
method_30505(com.mojang.brigadier.exceptions.CommandSyntaxException arg0)
formatException(com.mojang.brigadier.exceptions.CommandSyntaxException exception)
private void
updateUsageInfo(com.mojang.brigadier.ParseResults<ClientSuggestionProvider> currentParse, com.mojang.brigadier.suggestion.Suggestions suggestions)
method_23937(com.mojang.brigadier.ParseResults<class_637> arg0, com.mojang.brigadier.suggestion.Suggestions arg1)
showCommandSuggestions(com.mojang.brigadier.ParseResults<ClientCommandSource> parseResults, com.mojang.brigadier.suggestion.Suggestions suggestions)
private List<OrderedText>
fillNodeUsage(com.mojang.brigadier.context.SuggestionContext<ClientSuggestionProvider> suggestionContext, Style usageFormat)
method_23929(com.mojang.brigadier.context.SuggestionContext<class_637> arg0, class_2583 arg1)
showUsages(com.mojang.brigadier.context.SuggestionContext<ClientCommandSource> suggestionContext, Style style)
private void
recomputeUsageBoxWidth()
method_1_2347()
calculateWidth()
private OrderedText
formatChat(String text, int offset)
method_23931(String arg0, int arg1)
provideRenderText(String original, int firstCharacterIndex)
private static String
calculateSuggestionSuffix(String contents, String suggestion)
method_23936(String arg0, String arg1)
getSuggestionSuffix(String original, String suggestion)
private static OrderedText
formatText(com.mojang.brigadier.ParseResults<ClientSuggestionProvider> currentParse, String text, int offset)
method_23925(com.mojang.brigadier.ParseResults<class_637> arg0, String arg1, int arg2)
highlight(com.mojang.brigadier.ParseResults<ClientCommandSource> parse, String original, int firstCharacterIndex)
public void
extractRenderState(GuiGraphicsExtractor graphics, int mouseX, int mouseY)
method_23923(class_332 arg0, int arg1, int arg2)
render(DrawContext context, int mouseX, int mouseY)
public boolean
extractSuggestions(GuiGraphicsExtractor graphics, int mouseX, int mouseY)
method_44933(class_332 arg0, int arg1, int arg2)
tryRenderWindow(DrawContext context, int mouseX, int mouseY)
public void
extractUsage(GuiGraphicsExtractor graphics)
method_44932(class_332 arg0)
renderMessages(DrawContext context)
public Text
getNarrationMessage()
method_23958()
getNarration()
public boolean
hasAllowedInput()
method_1_2345()
isAllowedToSend()
private void
lambda$updateCommandInfo$0(com.mojang.brigadier.suggestion.Suggestions arg0)
method_23939(com.mojang.brigadier.suggestion.Suggestions arg0)
method_23939(com.mojang.brigadier.suggestion.Suggestions suggestions)