Class CommandSuggestions
java.lang.Object
net.minecraft.client.gui.components.CommandSuggestions
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate boolean(package private) final booleanprivate final booleanprivate final List<FormattedCharSequence> private intprivate intprivate com.mojang.brigadier.ParseResults<ClientSuggestionProvider> (package private) final int(package private) final Font(package private) final EditBox(package private) boolean(package private) final intprivate static final Style(package private) final Minecraftprivate final booleanprivate CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> private final Screen(package private) final intprivate static final Styleprivate static final Pattern -
Constructor Summary
ConstructorsConstructorDescriptionCommandSuggestions(Minecraft pMinecraft, Screen pScreen, EditBox pInput, Font pFont, boolean pCommandsOnly, boolean pOnlyShowIfCursorPastError, int pLineStartOffset, int pSuggestionLineLimit, boolean pAnchorToBottom, int pFillColor) -
Method Summary
Modifier and TypeMethodDescription(package private) static StringcalculateSuggestionSuffix(String pInputText, String pSuggestionText) private booleanfillNodeUsage(ChatFormatting pChatFormatting) private FormattedCharSequenceformatChat(String pCommand, int pMaxLength) private static FormattedCharSequenceformatText(com.mojang.brigadier.ParseResults<ClientSuggestionProvider> pProvider, String pCommand, int pMaxLength) private static FormattedCharSequencegetExceptionMessage(com.mojang.brigadier.exceptions.CommandSyntaxException pException) private static intgetLastWordIndex(String pText) voidhide()booleanbooleankeyPressed(KeyEvent pEvent) booleanmouseClicked(MouseButtonEvent pEvent) booleanmouseScrolled(double pDelta) voidrender(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY) booleanrenderSuggestions(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY) voidrenderUsage(GuiGraphics pGuiGraphics) voidsetAllowHiding(boolean pAllowHiding) voidsetAllowSuggestions(boolean pAutoSuggest) voidshowSuggestions(boolean pNarrateFirstSuggestion) private List<com.mojang.brigadier.suggestion.Suggestion> sortSuggestions(com.mojang.brigadier.suggestion.Suggestions pSuggestions) voidprivate void
-
Field Details
-
WHITESPACE_PATTERN
-
UNPARSED_STYLE
-
LITERAL_STYLE
-
ARGUMENT_STYLES
-
minecraft
-
screen
-
input
-
font
-
commandsOnly
private final boolean commandsOnly -
onlyShowIfCursorPastError
private final boolean onlyShowIfCursorPastError -
lineStartOffset
final int lineStartOffset -
suggestionLineLimit
final int suggestionLineLimit -
anchorToBottom
final boolean anchorToBottom -
fillColor
final int fillColor -
commandUsage
-
commandUsagePosition
private int commandUsagePosition -
commandUsageWidth
private int commandUsageWidth -
currentParse
-
pendingSuggestions
-
suggestions
-
allowSuggestions
private boolean allowSuggestions -
keepSuggestions
boolean keepSuggestions -
allowHiding
private boolean allowHiding
-
-
Constructor Details
-
CommandSuggestions
-
-
Method Details
-
setAllowSuggestions
public void setAllowSuggestions(boolean pAutoSuggest) -
setAllowHiding
public void setAllowHiding(boolean pAllowHiding) -
keyPressed
-
mouseScrolled
public boolean mouseScrolled(double pDelta) -
mouseClicked
-
showSuggestions
public void showSuggestions(boolean pNarrateFirstSuggestion) -
isVisible
public boolean isVisible() -
getUsageNarration
-
hide
public void hide() -
sortSuggestions
private List<com.mojang.brigadier.suggestion.Suggestion> sortSuggestions(com.mojang.brigadier.suggestion.Suggestions pSuggestions) -
updateCommandInfo
public void updateCommandInfo() -
getLastWordIndex
-
getExceptionMessage
private static FormattedCharSequence getExceptionMessage(com.mojang.brigadier.exceptions.CommandSyntaxException pException) -
updateUsageInfo
private void updateUsageInfo() -
fillNodeUsage
-
formatChat
-
calculateSuggestionSuffix
-
formatText
private static FormattedCharSequence formatText(com.mojang.brigadier.ParseResults<ClientSuggestionProvider> pProvider, String pCommand, int pMaxLength) -
render
-
renderSuggestions
-
renderUsage
-
getNarrationMessage
-