Class ServerList

java.lang.Object
net.minecraft.client.option.ServerList

@Environment(CLIENT) public class ServerList extends Object
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/ServerList
intermediary net/minecraft/class_641
official fym
  • Field Details Link icon

    • LOGGER Link icon

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/client/option/ServerList;LOGGER:Lorg/slf4j/Logger;
      intermediary field_3751 Lnet/minecraft/class_641;field_3751:Lorg/slf4j/Logger;
      official a Lfym;a:Lorg/slf4j/Logger;
    • IO_EXECUTOR Link icon

      private static final TaskExecutor<Runnable> IO_EXECUTOR
      Mappings:
      Namespace Name Mixin selector
      named IO_EXECUTOR Lnet/minecraft/client/option/ServerList;IO_EXECUTOR:Lnet/minecraft/util/thread/TaskExecutor;
      intermediary field_39360 Lnet/minecraft/class_641;field_39360:Lnet/minecraft/class_3846;
      official b Lfym;b:Lbpp;
    • MAX_HIDDEN_ENTRIES Link icon

      private static final int MAX_HIDDEN_ENTRIES
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_HIDDEN_ENTRIES Lnet/minecraft/client/option/ServerList;MAX_HIDDEN_ENTRIES:I
      intermediary field_39437 Lnet/minecraft/class_641;field_39437:I
      official c Lfym;c:I
    • client Link icon

      private final MinecraftClient client
      Mappings:
      Namespace Name Mixin selector
      named client Lnet/minecraft/client/option/ServerList;client:Lnet/minecraft/client/MinecraftClient;
      intermediary field_3750 Lnet/minecraft/class_641;field_3750:Lnet/minecraft/class_310;
      official d Lfym;d:Lffh;
    • servers Link icon

      private final List<ServerInfo> servers
      Mappings:
      Namespace Name Mixin selector
      named servers Lnet/minecraft/client/option/ServerList;servers:Ljava/util/List;
      intermediary field_3749 Lnet/minecraft/class_641;field_3749:Ljava/util/List;
      official e Lfym;e:Ljava/util/List;
    • hiddenServers Link icon

      private final List<ServerInfo> hiddenServers
      Mappings:
      Namespace Name Mixin selector
      named hiddenServers Lnet/minecraft/client/option/ServerList;hiddenServers:Ljava/util/List;
      intermediary field_39438 Lnet/minecraft/class_641;field_39438:Ljava/util/List;
      official f Lfym;f:Ljava/util/List;
  • Constructor Details Link icon

    • ServerList Link icon

      public ServerList(MinecraftClient client)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/option/ServerList;<init>(Lnet/minecraft/client/MinecraftClient;)V
      intermediary <init> Lnet/minecraft/class_641;<init>(Lnet/minecraft/class_310;)V
      official <init> Lfym;<init>(Lffh;)V
  • Method Details Link icon

    • loadFile Link icon

      public void loadFile()
      Mappings:
      Namespace Name Mixin selector
      named loadFile Lnet/minecraft/client/option/ServerList;loadFile()V
      intermediary method_2981 Lnet/minecraft/class_641;method_2981()V
      official a Lfym;a()V
    • saveFile Link icon

      public void saveFile()
      Mappings:
      Namespace Name Mixin selector
      named saveFile Lnet/minecraft/client/option/ServerList;saveFile()V
      intermediary method_2987 Lnet/minecraft/class_641;method_2987()V
      official b Lfym;b()V
    • get Link icon

      public ServerInfo get(int index)
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/client/option/ServerList;get(I)Lnet/minecraft/client/network/ServerInfo;
      intermediary method_2982 Lnet/minecraft/class_641;method_2982(I)Lnet/minecraft/class_642;
      official a Lfym;a(I)Lfyl;
    • get Link icon

      @Nullable public @Nullable ServerInfo get(String address)
      Returns the server info for address, or null if there is no such one.
      Returns:
      the server info for address, or null if there is no such one
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/client/option/ServerList;get(Ljava/lang/String;)Lnet/minecraft/client/network/ServerInfo;
      intermediary method_44295 Lnet/minecraft/class_641;method_44295(Ljava/lang/String;)Lnet/minecraft/class_642;
      official a Lfym;a(Ljava/lang/String;)Lfyl;
    • tryUnhide Link icon

      @Nullable public @Nullable ServerInfo tryUnhide(String address)
      Returns the previously hidden server info for the address address, or null if 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, or null if there is no such info
      Mappings:
      Namespace Name Mixin selector
      named tryUnhide Lnet/minecraft/client/option/ServerList;tryUnhide(Ljava/lang/String;)Lnet/minecraft/client/network/ServerInfo;
      intermediary method_44296 Lnet/minecraft/class_641;method_44296(Ljava/lang/String;)Lnet/minecraft/class_642;
      official b Lfym;b(Ljava/lang/String;)Lfyl;
    • remove Link icon

      public void remove(ServerInfo serverInfo)
      Mappings:
      Namespace Name Mixin selector
      named remove Lnet/minecraft/client/option/ServerList;remove(Lnet/minecraft/client/network/ServerInfo;)V
      intermediary method_2983 Lnet/minecraft/class_641;method_2983(Lnet/minecraft/class_642;)V
      official a Lfym;a(Lfyl;)V
    • add Link icon

      public void add(ServerInfo serverInfo, boolean hidden)
      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 add Lnet/minecraft/client/option/ServerList;add(Lnet/minecraft/client/network/ServerInfo;Z)V
      intermediary method_2988 Lnet/minecraft/class_641;method_2988(Lnet/minecraft/class_642;Z)V
      official a Lfym;a(Lfyl;Z)V
    • size Link icon

      public int size()
      Mappings:
      Namespace Name Mixin selector
      named size Lnet/minecraft/client/option/ServerList;size()I
      intermediary method_2984 Lnet/minecraft/class_641;method_2984()I
      official c Lfym;c()I
    • swapEntries Link icon

      public void swapEntries(int index1, int index2)
      Mappings:
      Namespace Name Mixin selector
      named swapEntries Lnet/minecraft/client/option/ServerList;swapEntries(II)V
      intermediary method_2985 Lnet/minecraft/class_641;method_2985(II)V
      official a Lfym;a(II)V
    • set Link icon

      public void set(int index, ServerInfo serverInfo)
      Mappings:
      Namespace Name Mixin selector
      named set Lnet/minecraft/client/option/ServerList;set(ILnet/minecraft/client/network/ServerInfo;)V
      intermediary method_2980 Lnet/minecraft/class_641;method_2980(ILnet/minecraft/class_642;)V
      official a Lfym;a(ILfyl;)V
    • replace Link icon

      private static boolean replace(ServerInfo serverInfo, List<ServerInfo> serverInfos)
      Replaces the server info in serverInfos whose name and address match serverInfo's with serverInfo.
      Mappings:
      Namespace Name Mixin selector
      named replace Lnet/minecraft/client/option/ServerList;replace(Lnet/minecraft/client/network/ServerInfo;Ljava/util/List;)Z
      intermediary method_44294 Lnet/minecraft/class_641;method_44294(Lnet/minecraft/class_642;Ljava/util/List;)Z
      official a Lfym;a(Lfyl;Ljava/util/List;)Z
    • updateServerListEntry Link icon

      public static void updateServerListEntry(ServerInfo serverInfo)
      Mappings:
      Namespace Name Mixin selector
      named updateServerListEntry Lnet/minecraft/client/option/ServerList;updateServerListEntry(Lnet/minecraft/client/network/ServerInfo;)V
      intermediary method_2986 Lnet/minecraft/class_641;method_2986(Lnet/minecraft/class_642;)V
      official b Lfym;b(Lfyl;)V