Package net.minecraft.client.network
Class ServerInfo
java.lang.Object
net.minecraft.client.network.ServerInfo
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 fopintermediary net/minecraft/class_642named net/minecraft/client/network/ServerInfo
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumThe policy of the client when this server sends a server resource pack.static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @org.jetbrains.annotations.Nullable byte[]private ServerInfo.class_9083private static final Loggerprivate static final intlongintprivate ServerInfo.ResourcePackPolicyprivate booleanprivate ServerInfo.ServerType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFrom(ServerInfo serverInfo) voidcopyWithSettingsFrom(ServerInfo serverInfo) static ServerInfofromNbt(NbtCompound root) @org.jetbrains.annotations.Nullable byte[]Returns the policy on resource packs sent by this server.booleanisLocal()booleanisRealm()booleanvoidmethod_55824(ServerInfo.class_9083 class_9083) voidsetFavicon(@org.jetbrains.annotations.Nullable byte[] favicon) voidsetResourcePackPolicy(ServerInfo.ResourcePackPolicy resourcePackPolicy) Sets the resource pack policy on this server.voidsetSecureChatEnforced(boolean secureChatEnforced) toNbt()static @org.jetbrains.annotations.Nullable byte[]validateFavicon(@org.jetbrains.annotations.Nullable byte[] favicon)
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official jLfop;j:Lorg/slf4j/Logger;intermediary field_42889Lnet/minecraft/class_642;field_42889:Lorg/slf4j/Logger;named LOGGERLnet/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 kLfop;k:Iintermediary field_46206Lnet/minecraft/class_642;field_46206:Inamed MAX_FAVICON_SIZELnet/minecraft/client/network/ServerInfo;MAX_FAVICON_SIZE:I
-
name
- Mappings:
Namespace Name Mixin selector official aLfop;a:Ljava/lang/String;intermediary field_3752Lnet/minecraft/class_642;field_3752:Ljava/lang/String;named nameLnet/minecraft/client/network/ServerInfo;name:Ljava/lang/String;
-
address
- Mappings:
Namespace Name Mixin selector official bLfop;b:Ljava/lang/String;intermediary field_3761Lnet/minecraft/class_642;field_3761:Ljava/lang/String;named addressLnet/minecraft/client/network/ServerInfo;address:Ljava/lang/String;
-
playerCountLabel
- Mappings:
Namespace Name Mixin selector official cLfop;c:Lvg;intermediary field_3753Lnet/minecraft/class_642;field_3753:Lnet/minecraft/class_2561;named playerCountLabelLnet/minecraft/client/network/ServerInfo;playerCountLabel:Lnet/minecraft/text/Text;
-
label
- Mappings:
Namespace Name Mixin selector official dLfop;d:Lvg;intermediary field_3757Lnet/minecraft/class_642;field_3757:Lnet/minecraft/class_2561;named labelLnet/minecraft/client/network/ServerInfo;label:Lnet/minecraft/text/Text;
-
players
- Mappings:
Namespace Name Mixin selector official eLfop;e:Lagi$b;intermediary field_41861Lnet/minecraft/class_642;field_41861:Lnet/minecraft/class_2926$class_2927;named playersLnet/minecraft/client/network/ServerInfo;players:Lnet/minecraft/server/ServerMetadata$Players;
-
ping
public long ping- Mappings:
Namespace Name Mixin selector official fLfop;f:Jintermediary field_3758Lnet/minecraft/class_642;field_3758:Jnamed pingLnet/minecraft/client/network/ServerInfo;ping:J
-
protocolVersion
public int protocolVersion- Mappings:
Namespace Name Mixin selector official gLfop;g:Iintermediary field_3756Lnet/minecraft/class_642;field_3756:Inamed protocolVersionLnet/minecraft/client/network/ServerInfo;protocolVersion:I
-
version
- Mappings:
Namespace Name Mixin selector official hLfop;h:Lvg;intermediary field_3760Lnet/minecraft/class_642;field_3760:Lnet/minecraft/class_2561;named versionLnet/minecraft/client/network/ServerInfo;version:Lnet/minecraft/text/Text;
-
playerListSummary
- Mappings:
Namespace Name Mixin selector official iLfop;i:Ljava/util/List;intermediary field_3762Lnet/minecraft/class_642;field_3762:Ljava/util/List;named playerListSummaryLnet/minecraft/client/network/ServerInfo;playerListSummary:Ljava/util/List;
-
resourcePackPolicy
- Mappings:
Namespace Name Mixin selector official lLfop;l:Lfop$a;intermediary field_3755Lnet/minecraft/class_642;field_3755:Lnet/minecraft/class_642$class_643;named resourcePackPolicyLnet/minecraft/client/network/ServerInfo;resourcePackPolicy:Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;
-
favicon
- Mappings:
Namespace Name Mixin selector official mLfop;m:[Bintermediary field_42890Lnet/minecraft/class_642;field_42890:[Bnamed faviconLnet/minecraft/client/network/ServerInfo;favicon:[B
-
serverType
- Mappings:
Namespace Name Mixin selector official nLfop;n:Lfop$c;intermediary field_45608Lnet/minecraft/class_642;field_45608:Lnet/minecraft/class_642$class_8678;named serverTypeLnet/minecraft/client/network/ServerInfo;serverType:Lnet/minecraft/client/network/ServerInfo$ServerType;
-
field_47879
- Mappings:
Namespace Name Mixin selector official oLfop;o:Lfop$b;intermediary field_47879Lnet/minecraft/class_642;field_47879:Lnet/minecraft/class_642$class_9083;named field_47879Lnet/minecraft/client/network/ServerInfo;field_47879:Lnet/minecraft/client/network/ServerInfo$class_9083;
-
secureChatEnforced
private boolean secureChatEnforced- Mappings:
Namespace Name Mixin selector official pLfop;p:Zintermediary field_39918Lnet/minecraft/class_642;field_39918:Znamed secureChatEnforcedLnet/minecraft/client/network/ServerInfo;secureChatEnforced:Z
-
-
Constructor Details
-
ServerInfo
- Mappings:
Namespace Name Mixin selector official <init>Lfop;<init>(Ljava/lang/String;Ljava/lang/String;Lfop$c;)Vintermediary <init>Lnet/minecraft/class_642;<init>(Ljava/lang/String;Ljava/lang/String;Lnet/minecraft/class_642$class_8678;)Vnamed <init>Lnet/minecraft/client/network/ServerInfo;<init>(Ljava/lang/String;Ljava/lang/String;Lnet/minecraft/client/network/ServerInfo$ServerType;)V
-
-
Method Details
-
toNbt
- Mappings:
Namespace Name Mixin selector official aLfop;a()Lso;intermediary method_2992Lnet/minecraft/class_642;method_2992()Lnet/minecraft/class_2487;named toNbtLnet/minecraft/client/network/ServerInfo;toNbt()Lnet/minecraft/nbt/NbtCompound;
-
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 bLfop;b()Lfop$a;intermediary method_2990Lnet/minecraft/class_642;method_2990()Lnet/minecraft/class_642$class_643;named getResourcePackPolicyLnet/minecraft/client/network/ServerInfo;getResourcePackPolicy()Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;
-
setResourcePackPolicy
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 aLfop;a(Lfop$a;)Vintermediary method_2995Lnet/minecraft/class_642;method_2995(Lnet/minecraft/class_642$class_643;)Vnamed setResourcePackPolicyLnet/minecraft/client/network/ServerInfo;setResourcePackPolicy(Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;)V
-
fromNbt
- Mappings:
Namespace Name Mixin selector official aLfop;a(Lso;)Lfop;intermediary method_2993Lnet/minecraft/class_642;method_2993(Lnet/minecraft/class_2487;)Lnet/minecraft/class_642;named fromNbtLnet/minecraft/client/network/ServerInfo;fromNbt(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/client/network/ServerInfo;
-
getFavicon
- Mappings:
Namespace Name Mixin selector official cLfop;c()[Bintermediary method_49306Lnet/minecraft/class_642;method_49306()[Bnamed getFaviconLnet/minecraft/client/network/ServerInfo;getFavicon()[B
-
setFavicon
- Mappings:
Namespace Name Mixin selector official aLfop;a([B)Vintermediary method_49305Lnet/minecraft/class_642;method_49305([B)Vnamed setFaviconLnet/minecraft/client/network/ServerInfo;setFavicon([B)V
-
isLocal
public boolean isLocal()- Mappings:
Namespace Name Mixin selector official dLfop;d()Zintermediary method_2994Lnet/minecraft/class_642;method_2994()Znamed isLocalLnet/minecraft/client/network/ServerInfo;isLocal()Z
-
isRealm
public boolean isRealm()- Mappings:
Namespace Name Mixin selector official eLfop;e()Zintermediary method_52811Lnet/minecraft/class_642;method_52811()Znamed isRealmLnet/minecraft/client/network/ServerInfo;isRealm()Z
-
getServerType
- Mappings:
Namespace Name Mixin selector official fLfop;f()Lfop$c;intermediary method_55616Lnet/minecraft/class_642;method_55616()Lnet/minecraft/class_642$class_8678;named getServerTypeLnet/minecraft/client/network/ServerInfo;getServerType()Lnet/minecraft/client/network/ServerInfo$ServerType;
-
setSecureChatEnforced
public void setSecureChatEnforced(boolean secureChatEnforced) - Mappings:
Namespace Name Mixin selector official aLfop;a(Z)Vintermediary method_45055Lnet/minecraft/class_642;method_45055(Z)Vnamed setSecureChatEnforcedLnet/minecraft/client/network/ServerInfo;setSecureChatEnforced(Z)V
-
isSecureChatEnforced
public boolean isSecureChatEnforced()- Mappings:
Namespace Name Mixin selector official gLfop;g()Zintermediary method_45056Lnet/minecraft/class_642;method_45056()Znamed isSecureChatEnforcedLnet/minecraft/client/network/ServerInfo;isSecureChatEnforced()Z
-
copyFrom
- Mappings:
Namespace Name Mixin selector official aLfop;a(Lfop;)Vintermediary method_44292Lnet/minecraft/class_642;method_44292(Lnet/minecraft/class_642;)Vnamed copyFromLnet/minecraft/client/network/ServerInfo;copyFrom(Lnet/minecraft/client/network/ServerInfo;)V
-
copyWithSettingsFrom
- Mappings:
Namespace Name Mixin selector official bLfop;b(Lfop;)Vintermediary method_2996Lnet/minecraft/class_642;method_2996(Lnet/minecraft/class_642;)Vnamed copyWithSettingsFromLnet/minecraft/client/network/ServerInfo;copyWithSettingsFrom(Lnet/minecraft/client/network/ServerInfo;)V
-
method_55825
- Mappings:
Namespace Name Mixin selector official hLfop;h()Lfop$b;intermediary method_55825Lnet/minecraft/class_642;method_55825()Lnet/minecraft/class_642$class_9083;named method_55825Lnet/minecraft/client/network/ServerInfo;method_55825()Lnet/minecraft/client/network/ServerInfo$class_9083;
-
method_55824
- Mappings:
Namespace Name Mixin selector official aLfop;a(Lfop$b;)Vintermediary method_55824Lnet/minecraft/class_642;method_55824(Lnet/minecraft/class_642$class_9083;)Vnamed method_55824Lnet/minecraft/client/network/ServerInfo;method_55824(Lnet/minecraft/client/network/ServerInfo$class_9083;)V
-
validateFavicon
@Nullable public static @org.jetbrains.annotations.Nullable byte[] validateFavicon(@Nullable @org.jetbrains.annotations.Nullable byte[] favicon) - Mappings:
Namespace Name Mixin selector official bLfop;b([B)[Bintermediary method_53885Lnet/minecraft/class_642;method_53885([B)[Bnamed validateFaviconLnet/minecraft/client/network/ServerInfo;validateFavicon([B)[B
-