Class CommandSuggestions
java.lang.Object
net.minecraft.client.gui.components.CommandSuggestions
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
(package private) final boolean
private final boolean
private final List
<FormattedCharSequence> private int
private int
private com.mojang.brigadier.ParseResults
<SharedSuggestionProvider> (package private) final int
(package private) final Font
(package private) final EditBox
(package private) boolean
(package private) final int
private static final Style
(package private) final Minecraft
private final boolean
private CompletableFuture
<com.mojang.brigadier.suggestion.Suggestions> private final Screen
(package private) final int
private static final Style
private 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 String
calculateSuggestionSuffix
(String pInputText, String pSuggestionText) private boolean
fillNodeUsage
(ChatFormatting pChatFormatting) private FormattedCharSequence
formatChat
(String p_93915_, int p_93916_) private static FormattedCharSequence
formatText
(com.mojang.brigadier.ParseResults<SharedSuggestionProvider> p_93893_, String p_93894_, int p_93895_) private static FormattedCharSequence
getExceptionMessage
(com.mojang.brigadier.exceptions.CommandSyntaxException p_93897_) private static int
getLastWordIndex
(String pText) void
hide()
boolean
boolean
keyPressed
(int pKeyCode, int pScanCode, int pModifiers) boolean
mouseClicked
(double pMouseX, double pMouseY, int pMouseButton) boolean
mouseScrolled
(double pDelta) void
render
(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY) boolean
renderSuggestions
(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY) void
renderUsage
(GuiGraphics pGuiGraphics) void
setAllowHiding
(boolean pAllowHiding) void
setAllowSuggestions
(boolean pAutoSuggest) void
showSuggestions
(boolean pNarrateFirstSuggestion) private List
<com.mojang.brigadier.suggestion.Suggestion> sortSuggestions
(com.mojang.brigadier.suggestion.Suggestions p_93899_) void
private 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
public boolean keyPressed(int pKeyCode, int pScanCode, int pModifiers) -
mouseScrolled
public boolean mouseScrolled(double pDelta) -
mouseClicked
public boolean mouseClicked(double pMouseX, double pMouseY, int pMouseButton) -
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 p_93899_) -
updateCommandInfo
public void updateCommandInfo() -
getLastWordIndex
-
getExceptionMessage
private static FormattedCharSequence getExceptionMessage(com.mojang.brigadier.exceptions.CommandSyntaxException p_93897_) -
updateUsageInfo
private void updateUsageInfo() -
fillNodeUsage
-
formatChat
-
calculateSuggestionSuffix
-
formatText
private static FormattedCharSequence formatText(com.mojang.brigadier.ParseResults<SharedSuggestionProvider> p_93893_, String p_93894_, int p_93895_) -
render
-
renderSuggestions
-
renderUsage
-
getNarrationMessage
-