Package net.minecraft.client.gui.screen
Class CommandSuggestor
java.lang.Object
net.minecraft.client.gui.screen.CommandSuggestor
@Environment(CLIENT) public class CommandSuggestor extends Object
- Mappings:
Namespace Name official drx
intermediary net/minecraft/class_4717
named net/minecraft/client/gui/screen/CommandSuggestor
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
CommandSuggestor.SuggestionWindow
-
Field Summary
Fields Modifier and Type Field Description private static Pattern
BACKSLASH_S_PATTERN
private boolean
chatScreenSized
private MinecraftClient
client
private int
color
private boolean
completingSuggestions
private static List<Style>
field_25887
private static Style
GRAY_FORMAT
private int
inWindowIndexOffset
private int
maxSuggestionSize
private List<OrderedText>
messages
private Screen
owner
private com.mojang.brigadier.ParseResults<CommandSource>
parse
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
pendingSuggestions
private static Style
RED_FORMAT
private boolean
slashOptional
private boolean
suggestingWhenEmpty
private TextFieldWidget
textField
private TextRenderer
textRenderer
private int
width
private CommandSuggestor.SuggestionWindow
window
private boolean
windowActive
private int
x
-
Constructor Summary
Constructors Constructor Description CommandSuggestor(MinecraftClient client, Screen owner, TextFieldWidget textField, TextRenderer textRenderer, boolean slashRequired, boolean suggestingWhenEmpty, int inWindowIndexOffset, int maxSuggestionSize, boolean chatScreenSized, int color)
-
Method Summary
Modifier and Type Method Description private static int
getLastPlayerNameStart(String input)
String
getNarration()
private static String
getSuggestionSuffix(String original, String suggestion)
private static OrderedText
highlight(com.mojang.brigadier.ParseResults<CommandSource> parse, String original, int firstCharacterIndex)
boolean
keyPressed(int keyCode, int scanCode, int modifiers)
private List<com.mojang.brigadier.suggestion.Suggestion>
method_30104(com.mojang.brigadier.suggestion.Suggestions suggestions)
private static OrderedText
method_30505(com.mojang.brigadier.exceptions.CommandSyntaxException commandSyntaxException)
boolean
mouseClicked(double mouseX, double mouseY, int button)
boolean
mouseScrolled(double amount)
private OrderedText
provideRenderText(String original, int firstCharacterIndex)
void
refresh()
void
render(MatrixStack matrices, int int2, int int3)
void
setWindowActive(boolean windowActive)
private void
show()
void
showSuggestions(boolean narrateFirstSuggestion)
private void
showUsages(Formatting formatting)
-
Field Details
-
BACKSLASH_S_PATTERN
- Mappings:
Namespace Name Mixin selector official a
Ldrx;a:Ljava/util/regex/Pattern;
intermediary field_21596
Lnet/minecraft/class_4717;field_21596:Ljava/util/regex/Pattern;
named BACKSLASH_S_PATTERN
Lnet/minecraft/client/gui/screen/CommandSuggestor;BACKSLASH_S_PATTERN:Ljava/util/regex/Pattern;
-
RED_FORMAT
- Mappings:
Namespace Name Mixin selector official b
Ldrx;b:Los;
intermediary field_25885
Lnet/minecraft/class_4717;field_25885:Lnet/minecraft/class_2583;
named RED_FORMAT
Lnet/minecraft/client/gui/screen/CommandSuggestor;RED_FORMAT:Lnet/minecraft/text/Style;
-
GRAY_FORMAT
- Mappings:
Namespace Name Mixin selector official c
Ldrx;c:Los;
intermediary field_25886
Lnet/minecraft/class_4717;field_25886:Lnet/minecraft/class_2583;
named GRAY_FORMAT
Lnet/minecraft/client/gui/screen/CommandSuggestor;GRAY_FORMAT:Lnet/minecraft/text/Style;
-
field_25887
- Mappings:
Namespace Name Mixin selector official d
Ldrx;d:Ljava/util/List;
intermediary field_25887
Lnet/minecraft/class_4717;field_25887:Ljava/util/List;
named field_25887
Lnet/minecraft/client/gui/screen/CommandSuggestor;field_25887:Ljava/util/List;
-
client
- Mappings:
Namespace Name Mixin selector official e
Ldrx;e:Ldqk;
intermediary field_21597
Lnet/minecraft/class_4717;field_21597:Lnet/minecraft/class_310;
named client
Lnet/minecraft/client/gui/screen/CommandSuggestor;client:Lnet/minecraft/client/MinecraftClient;
-
owner
- Mappings:
Namespace Name Mixin selector official f
Ldrx;f:Ldve;
intermediary field_21598
Lnet/minecraft/class_4717;field_21598:Lnet/minecraft/class_437;
named owner
Lnet/minecraft/client/gui/screen/CommandSuggestor;owner:Lnet/minecraft/client/gui/screen/Screen;
-
textField
- Mappings:
Namespace Name Mixin selector official g
Ldrx;g:Ldsc;
intermediary field_21599
Lnet/minecraft/class_4717;field_21599:Lnet/minecraft/class_342;
named textField
Lnet/minecraft/client/gui/screen/CommandSuggestor;textField:Lnet/minecraft/client/gui/widget/TextFieldWidget;
-
textRenderer
- Mappings:
Namespace Name Mixin selector official h
Ldrx;h:Ldrf;
intermediary field_21600
Lnet/minecraft/class_4717;field_21600:Lnet/minecraft/class_327;
named textRenderer
Lnet/minecraft/client/gui/screen/CommandSuggestor;textRenderer:Lnet/minecraft/client/font/TextRenderer;
-
slashOptional
private final boolean slashOptional- Mappings:
Namespace Name Mixin selector official i
Ldrx;i:Z
intermediary field_21601
Lnet/minecraft/class_4717;field_21601:Z
named slashOptional
Lnet/minecraft/client/gui/screen/CommandSuggestor;slashOptional:Z
-
suggestingWhenEmpty
private final boolean suggestingWhenEmpty- Mappings:
Namespace Name Mixin selector official j
Ldrx;j:Z
intermediary field_21602
Lnet/minecraft/class_4717;field_21602:Z
named suggestingWhenEmpty
Lnet/minecraft/client/gui/screen/CommandSuggestor;suggestingWhenEmpty:Z
-
inWindowIndexOffset
private final int inWindowIndexOffset- Mappings:
Namespace Name Mixin selector official k
Ldrx;k:I
intermediary field_21603
Lnet/minecraft/class_4717;field_21603:I
named inWindowIndexOffset
Lnet/minecraft/client/gui/screen/CommandSuggestor;inWindowIndexOffset:I
-
maxSuggestionSize
private final int maxSuggestionSize- Mappings:
Namespace Name Mixin selector official l
Ldrx;l:I
intermediary field_21604
Lnet/minecraft/class_4717;field_21604:I
named maxSuggestionSize
Lnet/minecraft/client/gui/screen/CommandSuggestor;maxSuggestionSize:I
-
chatScreenSized
private final boolean chatScreenSized- Mappings:
Namespace Name Mixin selector official m
Ldrx;m:Z
intermediary field_21605
Lnet/minecraft/class_4717;field_21605:Z
named chatScreenSized
Lnet/minecraft/client/gui/screen/CommandSuggestor;chatScreenSized:Z
-
color
private final int color- Mappings:
Namespace Name Mixin selector official n
Ldrx;n:I
intermediary field_21606
Lnet/minecraft/class_4717;field_21606:I
named color
Lnet/minecraft/client/gui/screen/CommandSuggestor;color:I
-
messages
- Mappings:
Namespace Name Mixin selector official o
Ldrx;o:Ljava/util/List;
intermediary field_21607
Lnet/minecraft/class_4717;field_21607:Ljava/util/List;
named messages
Lnet/minecraft/client/gui/screen/CommandSuggestor;messages:Ljava/util/List;
-
x
private int x- Mappings:
Namespace Name Mixin selector official p
Ldrx;p:I
intermediary field_21608
Lnet/minecraft/class_4717;field_21608:I
named x
Lnet/minecraft/client/gui/screen/CommandSuggestor;x:I
-
width
private int width- Mappings:
Namespace Name Mixin selector official q
Ldrx;q:I
intermediary field_21609
Lnet/minecraft/class_4717;field_21609:I
named width
Lnet/minecraft/client/gui/screen/CommandSuggestor;width:I
-
parse
- Mappings:
Namespace Name Mixin selector official r
Ldrx;r:Lcom/mojang/brigadier/ParseResults;
intermediary field_21610
Lnet/minecraft/class_4717;field_21610:Lcom/mojang/brigadier/ParseResults;
named parse
Lnet/minecraft/client/gui/screen/CommandSuggestor;parse:Lcom/mojang/brigadier/ParseResults;
-
pendingSuggestions
- Mappings:
Namespace Name Mixin selector official s
Ldrx;s:Ljava/util/concurrent/CompletableFuture;
intermediary field_21611
Lnet/minecraft/class_4717;field_21611:Ljava/util/concurrent/CompletableFuture;
named pendingSuggestions
Lnet/minecraft/client/gui/screen/CommandSuggestor;pendingSuggestions:Ljava/util/concurrent/CompletableFuture;
-
window
- Mappings:
Namespace Name Mixin selector official t
Ldrx;t:Ldrx$a;
intermediary field_21612
Lnet/minecraft/class_4717;field_21612:Lnet/minecraft/class_4717$class_464;
named window
Lnet/minecraft/client/gui/screen/CommandSuggestor;window:Lnet/minecraft/client/gui/screen/CommandSuggestor$SuggestionWindow;
-
windowActive
private boolean windowActive- Mappings:
Namespace Name Mixin selector official u
Ldrx;u:Z
intermediary field_21613
Lnet/minecraft/class_4717;field_21613:Z
named windowActive
Lnet/minecraft/client/gui/screen/CommandSuggestor;windowActive:Z
-
completingSuggestions
private boolean completingSuggestions- Mappings:
Namespace Name Mixin selector official v
Ldrx;v:Z
intermediary field_21614
Lnet/minecraft/class_4717;field_21614:Z
named completingSuggestions
Lnet/minecraft/client/gui/screen/CommandSuggestor;completingSuggestions:Z
-
-
Constructor Details
-
CommandSuggestor
public CommandSuggestor(MinecraftClient client, Screen owner, TextFieldWidget textField, TextRenderer textRenderer, boolean slashRequired, boolean suggestingWhenEmpty, int inWindowIndexOffset, int maxSuggestionSize, boolean chatScreenSized, int color)- Mappings:
Namespace Name Mixin selector official <init>
Ldrx;<init>(Ldqk;Ldve;Ldsc;Ldrf;ZZIIZI)V
intermediary <init>
Lnet/minecraft/class_4717;<init>(Lnet/minecraft/class_310;Lnet/minecraft/class_437;Lnet/minecraft/class_342;Lnet/minecraft/class_327;ZZIIZI)V
named <init>
Lnet/minecraft/client/gui/screen/CommandSuggestor;<init>(Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/client/gui/screen/Screen;Lnet/minecraft/client/gui/widget/TextFieldWidget;Lnet/minecraft/client/font/TextRenderer;ZZIIZI)V
-
-
Method Details
-
setWindowActive
public void setWindowActive(boolean windowActive)- Mappings:
Namespace Name Mixin selector official a
Ldrx;a(Z)V
intermediary method_23933
Lnet/minecraft/class_4717;method_23933(Z)V
named setWindowActive
Lnet/minecraft/client/gui/screen/CommandSuggestor;setWindowActive(Z)V
-
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers)- Mappings:
Namespace Name Mixin selector official a
Ldrx;a(III)Z
intermediary method_23924
Lnet/minecraft/class_4717;method_23924(III)Z
named keyPressed
Lnet/minecraft/client/gui/screen/CommandSuggestor;keyPressed(III)Z
-
mouseScrolled
public boolean mouseScrolled(double amount)- Mappings:
Namespace Name Mixin selector official a
Ldrx;a(D)Z
intermediary method_23921
Lnet/minecraft/class_4717;method_23921(D)Z
named mouseScrolled
Lnet/minecraft/client/gui/screen/CommandSuggestor;mouseScrolled(D)Z
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button)- Mappings:
Namespace Name Mixin selector official a
Ldrx;a(DDI)Z
intermediary method_23922
Lnet/minecraft/class_4717;method_23922(DDI)Z
named mouseClicked
Lnet/minecraft/client/gui/screen/CommandSuggestor;mouseClicked(DDI)Z
-
showSuggestions
public void showSuggestions(boolean narrateFirstSuggestion)- Mappings:
Namespace Name Mixin selector official b
Ldrx;b(Z)V
intermediary method_23920
Lnet/minecraft/class_4717;method_23920(Z)V
named showSuggestions
Lnet/minecraft/client/gui/screen/CommandSuggestor;showSuggestions(Z)V
-
method_30104
private List<com.mojang.brigadier.suggestion.Suggestion> method_30104(com.mojang.brigadier.suggestion.Suggestions suggestions)- Mappings:
Namespace Name Mixin selector official a
Ldrx;a(Lcom/mojang/brigadier/suggestion/Suggestions;)Ljava/util/List;
intermediary method_30104
Lnet/minecraft/class_4717;method_30104(Lcom/mojang/brigadier/suggestion/Suggestions;)Ljava/util/List;
named method_30104
Lnet/minecraft/client/gui/screen/CommandSuggestor;method_30104(Lcom/mojang/brigadier/suggestion/Suggestions;)Ljava/util/List;
-
refresh
public void refresh()- Mappings:
Namespace Name Mixin selector official a
Ldrx;a()V
intermediary method_23934
Lnet/minecraft/class_4717;method_23934()V
named refresh
Lnet/minecraft/client/gui/screen/CommandSuggestor;refresh()V
-
getLastPlayerNameStart
- Mappings:
Namespace Name Mixin selector official a
Ldrx;a(Ljava/lang/String;)I
intermediary method_23930
Lnet/minecraft/class_4717;method_23930(Ljava/lang/String;)I
named getLastPlayerNameStart
Lnet/minecraft/client/gui/screen/CommandSuggestor;getLastPlayerNameStart(Ljava/lang/String;)I
-
method_30505
private static OrderedText method_30505(com.mojang.brigadier.exceptions.CommandSyntaxException commandSyntaxException)- Mappings:
Namespace Name Mixin selector official a
Ldrx;a(Lcom/mojang/brigadier/exceptions/CommandSyntaxException;)Lafs;
intermediary method_30505
Lnet/minecraft/class_4717;method_30505(Lcom/mojang/brigadier/exceptions/CommandSyntaxException;)Lnet/minecraft/class_5481;
named method_30505
Lnet/minecraft/client/gui/screen/CommandSuggestor;method_30505(Lcom/mojang/brigadier/exceptions/CommandSyntaxException;)Lnet/minecraft/text/OrderedText;
-
show
private void show()- Mappings:
Namespace Name Mixin selector official c
Ldrx;c()V
intermediary method_23937
Lnet/minecraft/class_4717;method_23937()V
named show
Lnet/minecraft/client/gui/screen/CommandSuggestor;show()V
-
showUsages
- Mappings:
Namespace Name Mixin selector official a
Ldrx;a(Lk;)V
intermediary method_23929
Lnet/minecraft/class_4717;method_23929(Lnet/minecraft/class_124;)V
named showUsages
Lnet/minecraft/client/gui/screen/CommandSuggestor;showUsages(Lnet/minecraft/util/Formatting;)V
-
provideRenderText
- Mappings:
Namespace Name Mixin selector official a
Ldrx;a(Ljava/lang/String;I)Lafs;
intermediary method_23931
Lnet/minecraft/class_4717;method_23931(Ljava/lang/String;I)Lnet/minecraft/class_5481;
named provideRenderText
Lnet/minecraft/client/gui/screen/CommandSuggestor;provideRenderText(Ljava/lang/String;I)Lnet/minecraft/text/OrderedText;
-
getSuggestionSuffix
- Mappings:
Namespace Name Mixin selector official b
Ldrx;b(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
intermediary method_23936
Lnet/minecraft/class_4717;method_23936(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
named getSuggestionSuffix
Lnet/minecraft/client/gui/screen/CommandSuggestor;getSuggestionSuffix(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
-
highlight
private static OrderedText highlight(com.mojang.brigadier.ParseResults<CommandSource> parse, String original, int firstCharacterIndex)- Mappings:
Namespace Name Mixin selector official a
Ldrx;a(Lcom/mojang/brigadier/ParseResults;Ljava/lang/String;I)Lafs;
intermediary method_23925
Lnet/minecraft/class_4717;method_23925(Lcom/mojang/brigadier/ParseResults;Ljava/lang/String;I)Lnet/minecraft/class_5481;
named highlight
Lnet/minecraft/client/gui/screen/CommandSuggestor;highlight(Lcom/mojang/brigadier/ParseResults;Ljava/lang/String;I)Lnet/minecraft/text/OrderedText;
-
render
- Mappings:
Namespace Name Mixin selector official a
Ldrx;a(Ldlr;II)V
intermediary method_23923
Lnet/minecraft/class_4717;method_23923(Lnet/minecraft/class_4587;II)V
named render
Lnet/minecraft/client/gui/screen/CommandSuggestor;render(Lnet/minecraft/client/util/math/MatrixStack;II)V
-
getNarration
- Mappings:
Namespace Name Mixin selector official b
Ldrx;b()Ljava/lang/String;
intermediary method_23958
Lnet/minecraft/class_4717;method_23958()Ljava/lang/String;
named getNarration
Lnet/minecraft/client/gui/screen/CommandSuggestor;getNarration()Ljava/lang/String;
-