Package net.minecraft.client.option
Class ServerList
java.lang.Object
net.minecraft.client.option.ServerList
A list of
ServerInfo. The list can contain an unlimited amount of
server entries that are displayed on the multiplayer screen,
and up to 16 entries of servers
that are created when using "Direct Connection" and is hidden from the screen.- Mappings:
Namespace Name named net/minecraft/client/option/ServerListintermediary net/minecraft/class_641official fzu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MinecraftClientprivate final List<ServerInfo> private static final TaskExecutor<Runnable> private static final Loggerprivate static final intprivate final List<ServerInfo> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(ServerInfo serverInfo, boolean hidden) Adds a server info to this list.get(int index) Returns the server info foraddress, ornullif there is no such one.voidloadFile()voidremove(ServerInfo serverInfo) private static booleanreplace(ServerInfo serverInfo, List<ServerInfo> serverInfos) Replaces the server info inserverInfoswhose name and address matchserverInfo's withserverInfo.voidsaveFile()voidset(int index, ServerInfo serverInfo) intsize()voidswapEntries(int index1, int index2) Returns the previously hidden server info for the addressaddress, ornullif there is no such info.static voidupdateServerListEntry(ServerInfo serverInfo)
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/client/option/ServerList;LOGGER:Lorg/slf4j/Logger;intermediary field_3751Lnet/minecraft/class_641;field_3751:Lorg/slf4j/Logger;official aLfzu;a:Lorg/slf4j/Logger;
-
IO_EXECUTOR
- Mappings:
Namespace Name Mixin selector named IO_EXECUTORLnet/minecraft/client/option/ServerList;IO_EXECUTOR:Lnet/minecraft/util/thread/TaskExecutor;intermediary field_39360Lnet/minecraft/class_641;field_39360:Lnet/minecraft/class_3846;official bLfzu;b:Lbpk;
-
MAX_HIDDEN_ENTRIES
private static final int MAX_HIDDEN_ENTRIES- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_HIDDEN_ENTRIESLnet/minecraft/client/option/ServerList;MAX_HIDDEN_ENTRIES:Iintermediary field_39437Lnet/minecraft/class_641;field_39437:Iofficial cLfzu;c:I
-
client
- Mappings:
Namespace Name Mixin selector named clientLnet/minecraft/client/option/ServerList;client:Lnet/minecraft/client/MinecraftClient;intermediary field_3750Lnet/minecraft/class_641;field_3750:Lnet/minecraft/class_310;official dLfzu;d:Lfgo;
-
servers
- Mappings:
Namespace Name Mixin selector named serversLnet/minecraft/client/option/ServerList;servers:Ljava/util/List;intermediary field_3749Lnet/minecraft/class_641;field_3749:Ljava/util/List;official eLfzu;e:Ljava/util/List;
-
-
Constructor Details
-
ServerList
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/option/ServerList;<init>(Lnet/minecraft/client/MinecraftClient;)Vintermediary <init>Lnet/minecraft/class_641;<init>(Lnet/minecraft/class_310;)Vofficial <init>Lfzu;<init>(Lfgo;)V
-
-
Method Details
-
loadFile
public void loadFile()- Mappings:
Namespace Name Mixin selector named loadFileLnet/minecraft/client/option/ServerList;loadFile()Vintermediary method_2981Lnet/minecraft/class_641;method_2981()Vofficial aLfzu;a()V
-
saveFile
public void saveFile()- Mappings:
Namespace Name Mixin selector named saveFileLnet/minecraft/client/option/ServerList;saveFile()Vintermediary method_2987Lnet/minecraft/class_641;method_2987()Vofficial bLfzu;b()V
-
get
- Mappings:
Namespace Name Mixin selector named getLnet/minecraft/client/option/ServerList;get(I)Lnet/minecraft/client/network/ServerInfo;intermediary method_2982Lnet/minecraft/class_641;method_2982(I)Lnet/minecraft/class_642;official aLfzu;a(I)Lfzt;
-
get
Returns the server info foraddress, ornullif there is no such one.- Returns:
- the server info for
address, ornullif there is no such one - Mappings:
Namespace Name Mixin selector named getLnet/minecraft/client/option/ServerList;get(Ljava/lang/String;)Lnet/minecraft/client/network/ServerInfo;intermediary method_44295Lnet/minecraft/class_641;method_44295(Ljava/lang/String;)Lnet/minecraft/class_642;official aLfzu;a(Ljava/lang/String;)Lfzt;
-
tryUnhide
Returns the previously hidden server info for the addressaddress, ornullif there is no such info.This "unhides" the server info and is used when adding the entry to the multiplayer screen to unhide any existing server info created when connecting directly.
- Returns:
- the previously hidden server info for the address
address, ornullif there is no such info - Mappings:
Namespace Name Mixin selector named tryUnhideLnet/minecraft/client/option/ServerList;tryUnhide(Ljava/lang/String;)Lnet/minecraft/client/network/ServerInfo;intermediary method_44296Lnet/minecraft/class_641;method_44296(Ljava/lang/String;)Lnet/minecraft/class_642;official bLfzu;b(Ljava/lang/String;)Lfzt;
-
remove
- Mappings:
Namespace Name Mixin selector named removeLnet/minecraft/client/option/ServerList;remove(Lnet/minecraft/client/network/ServerInfo;)Vintermediary method_2983Lnet/minecraft/class_641;method_2983(Lnet/minecraft/class_642;)Vofficial aLfzu;a(Lfzt;)V
-
add
Adds a server info to this list.- Parameters:
hidden- whether the info should not be listed in the multiplayer screen (also called "direct connection")- Mappings:
Namespace Name Mixin selector named addLnet/minecraft/client/option/ServerList;add(Lnet/minecraft/client/network/ServerInfo;Z)Vintermediary method_2988Lnet/minecraft/class_641;method_2988(Lnet/minecraft/class_642;Z)Vofficial aLfzu;a(Lfzt;Z)V
-
size
public int size()- Mappings:
Namespace Name Mixin selector named sizeLnet/minecraft/client/option/ServerList;size()Iintermediary method_2984Lnet/minecraft/class_641;method_2984()Iofficial cLfzu;c()I
-
swapEntries
public void swapEntries(int index1, int index2) - Mappings:
Namespace Name Mixin selector named swapEntriesLnet/minecraft/client/option/ServerList;swapEntries(II)Vintermediary method_2985Lnet/minecraft/class_641;method_2985(II)Vofficial aLfzu;a(II)V
-
set
- Mappings:
Namespace Name Mixin selector named setLnet/minecraft/client/option/ServerList;set(ILnet/minecraft/client/network/ServerInfo;)Vintermediary method_2980Lnet/minecraft/class_641;method_2980(ILnet/minecraft/class_642;)Vofficial aLfzu;a(ILfzt;)V
-
replace
Replaces the server info inserverInfoswhose name and address matchserverInfo's withserverInfo.- Mappings:
Namespace Name Mixin selector named replaceLnet/minecraft/client/option/ServerList;replace(Lnet/minecraft/client/network/ServerInfo;Ljava/util/List;)Zintermediary method_44294Lnet/minecraft/class_641;method_44294(Lnet/minecraft/class_642;Ljava/util/List;)Zofficial aLfzu;a(Lfzt;Ljava/util/List;)Z
-
updateServerListEntry
- Mappings:
Namespace Name Mixin selector named updateServerListEntryLnet/minecraft/client/option/ServerList;updateServerListEntry(Lnet/minecraft/client/network/ServerInfo;)Vintermediary method_2986Lnet/minecraft/class_641;method_2986(Lnet/minecraft/class_642;)Vofficial bLfzu;b(Lfzt;)V
-