Class ServerInfo

java.lang.Object
net.minecraft.client.network.ServerInfo

@Environment(CLIENT) public class ServerInfo extends Object
The information of a server entry in the list of servers available in the multiplayer screen, or that of the servers connected directly. The information for directly-connected servers are also saved (although hidden from the multiplayer screen) so that chat preview acknowledgements and other settings are saved. The list of these servers is stored in the servers.dat file within the client game directory.
See Also:
Mappings:
Namespace Name
named net/minecraft/client/network/ServerInfo
intermediary net/minecraft/class_642
official fyz
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/client/network/ServerInfo;LOGGER:Lorg/slf4j/Logger;
      intermediary field_42889 Lnet/minecraft/class_642;field_42889:Lorg/slf4j/Logger;
      official j Lfyz;j:Lorg/slf4j/Logger;
    • MAX_FAVICON_SIZE

      private static final int MAX_FAVICON_SIZE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_FAVICON_SIZE Lnet/minecraft/client/network/ServerInfo;MAX_FAVICON_SIZE:I
      intermediary field_46206 Lnet/minecraft/class_642;field_46206:I
      official k Lfyz;k:I
    • name

      public String name
      Mappings:
      Namespace Name Mixin selector
      named name Lnet/minecraft/client/network/ServerInfo;name:Ljava/lang/String;
      intermediary field_3752 Lnet/minecraft/class_642;field_3752:Ljava/lang/String;
      official a Lfyz;a:Ljava/lang/String;
    • address

      public String address
      Mappings:
      Namespace Name Mixin selector
      named address Lnet/minecraft/client/network/ServerInfo;address:Ljava/lang/String;
      intermediary field_3761 Lnet/minecraft/class_642;field_3761:Ljava/lang/String;
      official b Lfyz;b:Ljava/lang/String;
    • playerCountLabel

      public Text playerCountLabel
      Mappings:
      Namespace Name Mixin selector
      named playerCountLabel Lnet/minecraft/client/network/ServerInfo;playerCountLabel:Lnet/minecraft/text/Text;
      intermediary field_3753 Lnet/minecraft/class_642;field_3753:Lnet/minecraft/class_2561;
      official c Lfyz;c:Lwu;
    • label

      public Text label
      Mappings:
      Namespace Name Mixin selector
      named label Lnet/minecraft/client/network/ServerInfo;label:Lnet/minecraft/text/Text;
      intermediary field_3757 Lnet/minecraft/class_642;field_3757:Lnet/minecraft/class_2561;
      official d Lfyz;d:Lwu;
    • players

      Mappings:
      Namespace Name Mixin selector
      named players Lnet/minecraft/client/network/ServerInfo;players:Lnet/minecraft/server/ServerMetadata$Players;
      intermediary field_41861 Lnet/minecraft/class_642;field_41861:Lnet/minecraft/class_2926$class_2927;
      official e Lfyz;e:Lajj$b;
    • ping

      public long ping
      Mappings:
      Namespace Name Mixin selector
      named ping Lnet/minecraft/client/network/ServerInfo;ping:J
      intermediary field_3758 Lnet/minecraft/class_642;field_3758:J
      official f Lfyz;f:J
    • protocolVersion

      public int protocolVersion
      Mappings:
      Namespace Name Mixin selector
      named protocolVersion Lnet/minecraft/client/network/ServerInfo;protocolVersion:I
      intermediary field_3756 Lnet/minecraft/class_642;field_3756:I
      official g Lfyz;g:I
    • version

      public Text version
      Mappings:
      Namespace Name Mixin selector
      named version Lnet/minecraft/client/network/ServerInfo;version:Lnet/minecraft/text/Text;
      intermediary field_3760 Lnet/minecraft/class_642;field_3760:Lnet/minecraft/class_2561;
      official h Lfyz;h:Lwu;
    • playerListSummary

      public List<Text> playerListSummary
      Mappings:
      Namespace Name Mixin selector
      named playerListSummary Lnet/minecraft/client/network/ServerInfo;playerListSummary:Ljava/util/List;
      intermediary field_3762 Lnet/minecraft/class_642;field_3762:Ljava/util/List;
      official i Lfyz;i:Ljava/util/List;
    • resourcePackPolicy

      private ServerInfo.ResourcePackPolicy resourcePackPolicy
      Mappings:
      Namespace Name Mixin selector
      named resourcePackPolicy Lnet/minecraft/client/network/ServerInfo;resourcePackPolicy:Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;
      intermediary field_3755 Lnet/minecraft/class_642;field_3755:Lnet/minecraft/class_642$class_643;
      official l Lfyz;l:Lfyz$a;
    • favicon

      @Nullable private @org.jetbrains.annotations.Nullable byte[] favicon
      Mappings:
      Namespace Name Mixin selector
      named favicon Lnet/minecraft/client/network/ServerInfo;favicon:[B
      intermediary field_42890 Lnet/minecraft/class_642;field_42890:[B
      official m Lfyz;m:[B
    • serverType

      private ServerInfo.ServerType serverType
      Mappings:
      Namespace Name Mixin selector
      named serverType Lnet/minecraft/client/network/ServerInfo;serverType:Lnet/minecraft/client/network/ServerInfo$ServerType;
      intermediary field_45608 Lnet/minecraft/class_642;field_45608:Lnet/minecraft/class_642$class_8678;
      official n Lfyz;n:Lfyz$c;
    • status

      private ServerInfo.Status status
      Mappings:
      Namespace Name Mixin selector
      named status Lnet/minecraft/client/network/ServerInfo;status:Lnet/minecraft/client/network/ServerInfo$Status;
      intermediary field_47879 Lnet/minecraft/class_642;field_47879:Lnet/minecraft/class_642$class_9083;
      official o Lfyz;o:Lfyz$b;
  • Constructor Details

    • ServerInfo

      public ServerInfo(String name, String address, ServerInfo.ServerType serverType)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/network/ServerInfo;<init>(Ljava/lang/String;Ljava/lang/String;Lnet/minecraft/client/network/ServerInfo$ServerType;)V
      intermediary <init> Lnet/minecraft/class_642;<init>(Ljava/lang/String;Ljava/lang/String;Lnet/minecraft/class_642$class_8678;)V
      official <init> Lfyz;<init>(Ljava/lang/String;Ljava/lang/String;Lfyz$c;)V
  • Method Details

    • toNbt

      public NbtCompound toNbt()
      Mappings:
      Namespace Name Mixin selector
      named toNbt Lnet/minecraft/client/network/ServerInfo;toNbt()Lnet/minecraft/nbt/NbtCompound;
      intermediary method_2992 Lnet/minecraft/class_642;method_2992()Lnet/minecraft/class_2487;
      official a Lfyz;a()Ltx;
    • getResourcePackPolicy

      public ServerInfo.ResourcePackPolicy getResourcePackPolicy()
      Returns the policy on resource packs sent by this server.
      Returns:
      the policy on resource packs sent by this server
      Mappings:
      Namespace Name Mixin selector
      named getResourcePackPolicy Lnet/minecraft/client/network/ServerInfo;getResourcePackPolicy()Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;
      intermediary method_2990 Lnet/minecraft/class_642;method_2990()Lnet/minecraft/class_642$class_643;
      official b Lfyz;b()Lfyz$a;
    • setResourcePackPolicy

      public void setResourcePackPolicy(ServerInfo.ResourcePackPolicy resourcePackPolicy)
      Sets the resource pack policy on this server.

      This is called when a user has responded to the prompt on whether to accept server resource packs from this server in the future.

      Mappings:
      Namespace Name Mixin selector
      named setResourcePackPolicy Lnet/minecraft/client/network/ServerInfo;setResourcePackPolicy(Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;)V
      intermediary method_2995 Lnet/minecraft/class_642;method_2995(Lnet/minecraft/class_642$class_643;)V
      official a Lfyz;a(Lfyz$a;)V
    • fromNbt

      public static ServerInfo fromNbt(NbtCompound root)
      Mappings:
      Namespace Name Mixin selector
      named fromNbt Lnet/minecraft/client/network/ServerInfo;fromNbt(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/client/network/ServerInfo;
      intermediary method_2993 Lnet/minecraft/class_642;method_2993(Lnet/minecraft/class_2487;)Lnet/minecraft/class_642;
      official a Lfyz;a(Ltx;)Lfyz;
    • getFavicon

      @Nullable public @org.jetbrains.annotations.Nullable byte[] getFavicon()
      Mappings:
      Namespace Name Mixin selector
      named getFavicon Lnet/minecraft/client/network/ServerInfo;getFavicon()[B
      intermediary method_49306 Lnet/minecraft/class_642;method_49306()[B
      official c Lfyz;c()[B
    • setFavicon

      public void setFavicon(@Nullable @org.jetbrains.annotations.Nullable byte[] favicon)
      Mappings:
      Namespace Name Mixin selector
      named setFavicon Lnet/minecraft/client/network/ServerInfo;setFavicon([B)V
      intermediary method_49305 Lnet/minecraft/class_642;method_49305([B)V
      official a Lfyz;a([B)V
    • isLocal

      public boolean isLocal()
      Mappings:
      Namespace Name Mixin selector
      named isLocal Lnet/minecraft/client/network/ServerInfo;isLocal()Z
      intermediary method_2994 Lnet/minecraft/class_642;method_2994()Z
      official d Lfyz;d()Z
    • isRealm

      public boolean isRealm()
      Mappings:
      Namespace Name Mixin selector
      named isRealm Lnet/minecraft/client/network/ServerInfo;isRealm()Z
      intermediary method_52811 Lnet/minecraft/class_642;method_52811()Z
      official e Lfyz;e()Z
    • getServerType

      public ServerInfo.ServerType getServerType()
      Mappings:
      Namespace Name Mixin selector
      named getServerType Lnet/minecraft/client/network/ServerInfo;getServerType()Lnet/minecraft/client/network/ServerInfo$ServerType;
      intermediary method_55616 Lnet/minecraft/class_642;method_55616()Lnet/minecraft/class_642$class_8678;
      official f Lfyz;f()Lfyz$c;
    • copyFrom

      public void copyFrom(ServerInfo serverInfo)
      Mappings:
      Namespace Name Mixin selector
      named copyFrom Lnet/minecraft/client/network/ServerInfo;copyFrom(Lnet/minecraft/client/network/ServerInfo;)V
      intermediary method_44292 Lnet/minecraft/class_642;method_44292(Lnet/minecraft/class_642;)V
      official a Lfyz;a(Lfyz;)V
    • copyWithSettingsFrom

      public void copyWithSettingsFrom(ServerInfo serverInfo)
      Mappings:
      Namespace Name Mixin selector
      named copyWithSettingsFrom Lnet/minecraft/client/network/ServerInfo;copyWithSettingsFrom(Lnet/minecraft/client/network/ServerInfo;)V
      intermediary method_2996 Lnet/minecraft/class_642;method_2996(Lnet/minecraft/class_642;)V
      official b Lfyz;b(Lfyz;)V
    • getStatus

      public ServerInfo.Status getStatus()
      Mappings:
      Namespace Name Mixin selector
      named getStatus Lnet/minecraft/client/network/ServerInfo;getStatus()Lnet/minecraft/client/network/ServerInfo$Status;
      intermediary method_55825 Lnet/minecraft/class_642;method_55825()Lnet/minecraft/class_642$class_9083;
      official g Lfyz;g()Lfyz$b;
    • setStatus

      public void setStatus(ServerInfo.Status status)
      Mappings:
      Namespace Name Mixin selector
      named setStatus Lnet/minecraft/client/network/ServerInfo;setStatus(Lnet/minecraft/client/network/ServerInfo$Status;)V
      intermediary method_55824 Lnet/minecraft/class_642;method_55824(Lnet/minecraft/class_642$class_9083;)V
      official a Lfyz;a(Lfyz$b;)V
    • validateFavicon

      @Nullable public static @org.jetbrains.annotations.Nullable byte[] validateFavicon(@Nullable @org.jetbrains.annotations.Nullable byte[] favicon)
      Mappings:
      Namespace Name Mixin selector
      named validateFavicon Lnet/minecraft/client/network/ServerInfo;validateFavicon([B)[B
      intermediary method_53885 Lnet/minecraft/class_642;method_53885([B)[B
      official b Lfyz;b([B)[B