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
official fjh
intermediary net/minecraft/class_642
named net/minecraft/client/network/ServerInfo
  • Field Details

    • LOGGER

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

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

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

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

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

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

      @Nullable public ServerMetadata.Players players
      Mappings:
      Namespace Name Mixin selector
      official e Lfjh;e:Ladz$b;
      intermediary field_41861 Lnet/minecraft/class_642;field_41861:Lnet/minecraft/class_2926$class_2927;
      named players Lnet/minecraft/client/network/ServerInfo;players:Lnet/minecraft/server/ServerMetadata$Players;
    • ping

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

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

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

      public boolean online
      Mappings:
      Namespace Name Mixin selector
      official i Lfjh;i:Z
      intermediary field_3754 Lnet/minecraft/class_642;field_3754:Z
      named online Lnet/minecraft/client/network/ServerInfo;online:Z
    • playerListSummary

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

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

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

      private ServerInfo.ServerType serverType
      Mappings:
      Namespace Name Mixin selector
      official o Lfjh;o:Lfjh$b;
      intermediary field_45608 Lnet/minecraft/class_642;field_45608:Lnet/minecraft/class_642$class_8678;
      named serverType Lnet/minecraft/client/network/ServerInfo;serverType:Lnet/minecraft/client/network/ServerInfo$ServerType;
    • secureChatEnforced

      private boolean secureChatEnforced
      Mappings:
      Namespace Name Mixin selector
      official p Lfjh;p:Z
      intermediary field_39918 Lnet/minecraft/class_642;field_39918:Z
      named secureChatEnforced Lnet/minecraft/client/network/ServerInfo;secureChatEnforced:Z
  • Constructor Details

    • ServerInfo

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

    • toNbt

      public NbtCompound toNbt()
      Mappings:
      Namespace Name Mixin selector
      official a Lfjh;a()Lqw;
      intermediary method_2992 Lnet/minecraft/class_642;method_2992()Lnet/minecraft/class_2487;
      named toNbt Lnet/minecraft/client/network/ServerInfo;toNbt()Lnet/minecraft/nbt/NbtCompound;
    • 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
      official b Lfjh;b()Lfjh$a;
      intermediary method_2990 Lnet/minecraft/class_642;method_2990()Lnet/minecraft/class_642$class_643;
      named getResourcePackPolicy Lnet/minecraft/client/network/ServerInfo;getResourcePackPolicy()Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;
    • 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
      official a Lfjh;a(Lfjh$a;)V
      intermediary method_2995 Lnet/minecraft/class_642;method_2995(Lnet/minecraft/class_642$class_643;)V
      named setResourcePackPolicy Lnet/minecraft/client/network/ServerInfo;setResourcePackPolicy(Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;)V
    • fromNbt

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

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

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

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

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

      public void setSecureChatEnforced(boolean secureChatEnforced)
      Mappings:
      Namespace Name Mixin selector
      official a Lfjh;a(Z)V
      intermediary method_45055 Lnet/minecraft/class_642;method_45055(Z)V
      named setSecureChatEnforced Lnet/minecraft/client/network/ServerInfo;setSecureChatEnforced(Z)V
    • isSecureChatEnforced

      public boolean isSecureChatEnforced()
      Mappings:
      Namespace Name Mixin selector
      official f Lfjh;f()Z
      intermediary method_45056 Lnet/minecraft/class_642;method_45056()Z
      named isSecureChatEnforced Lnet/minecraft/client/network/ServerInfo;isSecureChatEnforced()Z
    • copyFrom

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

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

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