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 minecraft, Screen screen, EditBox input, Font font, boolean commandsOnly, boolean onlyShowIfCursorPastError, int lineStartOffset, int suggestionLineLimit, boolean anchorToBottom, int fillColor) -
Method Summary
Modifier and TypeMethodDescription(package private) static String
calculateSuggestionSuffix
(String inputText, String suggestionText) private boolean
fillNodeUsage
(ChatFormatting chatFormatting) private FormattedCharSequence
formatChat
(String command, int maxLength) private static FormattedCharSequence
formatText
(com.mojang.brigadier.ParseResults<SharedSuggestionProvider> provider, String command, int maxLength) private static FormattedCharSequence
getExceptionMessage
(com.mojang.brigadier.exceptions.CommandSyntaxException exception) private static int
getLastWordIndex
(String text) void
hide()
boolean
boolean
keyPressed
(int keyCode, int scanCode, int modifiers) boolean
mouseClicked
(double mouseX, double mouseY, int mouseButton) boolean
mouseScrolled
(double delta) void
render
(GuiGraphics guiGraphics, int mouseX, int mouseY) boolean
renderSuggestions
(GuiGraphics guiGraphics, int mouseX, int mouseY) void
renderUsage
(GuiGraphics guiGraphics) void
setAllowHiding
(boolean allowHiding) void
setAllowSuggestions
(boolean autoSuggest) void
showSuggestions
(boolean narrateFirstSuggestion) private List
<com.mojang.brigadier.suggestion.Suggestion> sortSuggestions
(com.mojang.brigadier.suggestion.Suggestions suggestions) 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 autoSuggest) -
setAllowHiding
public void setAllowHiding(boolean allowHiding) -
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) -
mouseScrolled
public boolean mouseScrolled(double delta) -
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int mouseButton) -
showSuggestions
public void showSuggestions(boolean narrateFirstSuggestion) -
isVisible
public boolean isVisible() -
getUsageNarration
-
hide
public void hide() -
sortSuggestions
private List<com.mojang.brigadier.suggestion.Suggestion> sortSuggestions(com.mojang.brigadier.suggestion.Suggestions suggestions) -
updateCommandInfo
public void updateCommandInfo() -
getLastWordIndex
-
getExceptionMessage
private static FormattedCharSequence getExceptionMessage(com.mojang.brigadier.exceptions.CommandSyntaxException exception) -
updateUsageInfo
private void updateUsageInfo() -
fillNodeUsage
-
formatChat
-
calculateSuggestionSuffix
-
formatText
private static FormattedCharSequence formatText(com.mojang.brigadier.ParseResults<SharedSuggestionProvider> provider, String command, int maxLength) -
render
-
renderSuggestions
-
renderUsage
-
getNarrationMessage
-