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 named net/minecraft/client/network/ServerInfointermediary net/minecraft/class_642official hef
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe policy of the client when this server sends a server resource pack.static enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate byte @Nullable []private static final Loggerprivate static final intlongintprivate ServerInfo.ResourcePackPolicyprivate ServerInfo.ServerTypeprivate ServerInfo.Status -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFrom(ServerInfo serverInfo) voidcopyWithSettingsFrom(ServerInfo serverInfo) static ServerInfofromNbt(NbtCompound root) byte @Nullable []Returns the policy on resource packs sent by this server.booleanhasAcceptedCodeOfConduct(String codeOfConductText) booleanisLocal()booleanisRealm()voidvoidsetAcceptedCodeOfConduct(String codeOfConductText) voidsetFavicon(byte @Nullable [] favicon) voidsetResourcePackPolicy(ServerInfo.ResourcePackPolicy resourcePackPolicy) Sets the resource pack policy on this server.voidsetStatus(ServerInfo.Status status) toNbt()static byte @Nullable []validateFavicon(byte @Nullable [] favicon)
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/client/network/ServerInfo;LOGGER:Lorg/slf4j/Logger;intermediary field_42889Lnet/minecraft/class_642;field_42889:Lorg/slf4j/Logger;official jLhef;j:Lorg/slf4j/Logger;
-
MAX_FAVICON_SIZE
private static final int MAX_FAVICON_SIZE- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_FAVICON_SIZELnet/minecraft/client/network/ServerInfo;MAX_FAVICON_SIZE:Iintermediary field_46206Lnet/minecraft/class_642;field_46206:Iofficial kLhef;k:I
-
name
- Mappings:
Namespace Name Mixin selector named nameLnet/minecraft/client/network/ServerInfo;name:Ljava/lang/String;intermediary field_3752Lnet/minecraft/class_642;field_3752:Ljava/lang/String;official aLhef;a:Ljava/lang/String;
-
address
- Mappings:
Namespace Name Mixin selector named addressLnet/minecraft/client/network/ServerInfo;address:Ljava/lang/String;intermediary field_3761Lnet/minecraft/class_642;field_3761:Ljava/lang/String;official bLhef;b:Ljava/lang/String;
-
playerCountLabel
- Mappings:
Namespace Name Mixin selector named playerCountLabelLnet/minecraft/client/network/ServerInfo;playerCountLabel:Lnet/minecraft/text/Text;intermediary field_3753Lnet/minecraft/class_642;field_3753:Lnet/minecraft/class_2561;official cLhef;c:Lyi;
-
label
- Mappings:
Namespace Name Mixin selector named labelLnet/minecraft/client/network/ServerInfo;label:Lnet/minecraft/text/Text;intermediary field_3757Lnet/minecraft/class_642;field_3757:Lnet/minecraft/class_2561;official dLhef;d:Lyi;
-
players
- Mappings:
Namespace Name Mixin selector named playersLnet/minecraft/client/network/ServerInfo;players:Lnet/minecraft/server/ServerMetadata$Players;intermediary field_41861Lnet/minecraft/class_642;field_41861:Lnet/minecraft/class_2926$class_2927;official eLhef;e:Lalr$b;
-
ping
public long ping- Mappings:
Namespace Name Mixin selector named pingLnet/minecraft/client/network/ServerInfo;ping:Jintermediary field_3758Lnet/minecraft/class_642;field_3758:Jofficial fLhef;f:J
-
protocolVersion
public int protocolVersion- Mappings:
Namespace Name Mixin selector named protocolVersionLnet/minecraft/client/network/ServerInfo;protocolVersion:Iintermediary field_3756Lnet/minecraft/class_642;field_3756:Iofficial gLhef;g:I
-
version
- Mappings:
Namespace Name Mixin selector named versionLnet/minecraft/client/network/ServerInfo;version:Lnet/minecraft/text/Text;intermediary field_3760Lnet/minecraft/class_642;field_3760:Lnet/minecraft/class_2561;official hLhef;h:Lyi;
-
playerListSummary
- Mappings:
Namespace Name Mixin selector named playerListSummaryLnet/minecraft/client/network/ServerInfo;playerListSummary:Ljava/util/List;intermediary field_3762Lnet/minecraft/class_642;field_3762:Ljava/util/List;official iLhef;i:Ljava/util/List;
-
resourcePackPolicy
- Mappings:
Namespace Name Mixin selector named resourcePackPolicyLnet/minecraft/client/network/ServerInfo;resourcePackPolicy:Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;intermediary field_3755Lnet/minecraft/class_642;field_3755:Lnet/minecraft/class_642$class_643;official lLhef;l:Lhef$a;
-
favicon
private byte @Nullable [] favicon- Mappings:
Namespace Name Mixin selector named faviconLnet/minecraft/client/network/ServerInfo;favicon:[Bintermediary field_42890Lnet/minecraft/class_642;field_42890:[Bofficial mLhef;m:[B
-
serverType
- Mappings:
Namespace Name Mixin selector named serverTypeLnet/minecraft/client/network/ServerInfo;serverType:Lnet/minecraft/client/network/ServerInfo$ServerType;intermediary field_45608Lnet/minecraft/class_642;field_45608:Lnet/minecraft/class_642$class_8678;official nLhef;n:Lhef$c;
-
acceptedCodeOfConduct
private int acceptedCodeOfConduct- Mappings:
Namespace Name Mixin selector named acceptedCodeOfConductLnet/minecraft/client/network/ServerInfo;acceptedCodeOfConduct:Iintermediary field_62211Lnet/minecraft/class_642;field_62211:Iofficial oLhef;o:I
-
status
- Mappings:
Namespace Name Mixin selector named statusLnet/minecraft/client/network/ServerInfo;status:Lnet/minecraft/client/network/ServerInfo$Status;intermediary field_47879Lnet/minecraft/class_642;field_47879:Lnet/minecraft/class_642$class_9083;official pLhef;p:Lhef$b;
-
-
Constructor Details
-
ServerInfo
- 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;)Vintermediary <init>Lnet/minecraft/class_642;<init>(Ljava/lang/String;Ljava/lang/String;Lnet/minecraft/class_642$class_8678;)Vofficial <init>Lhef;<init>(Ljava/lang/String;Ljava/lang/String;Lhef$c;)V
-
-
Method Details
-
toNbt
- Mappings:
Namespace Name Mixin selector named toNbtLnet/minecraft/client/network/ServerInfo;toNbt()Lnet/minecraft/nbt/NbtCompound;intermediary method_2992Lnet/minecraft/class_642;method_2992()Lnet/minecraft/class_2487;official aLhef;a()Lva;
-
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 getResourcePackPolicyLnet/minecraft/client/network/ServerInfo;getResourcePackPolicy()Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;intermediary method_2990Lnet/minecraft/class_642;method_2990()Lnet/minecraft/class_642$class_643;official bLhef;b()Lhef$a;
-
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 named setResourcePackPolicyLnet/minecraft/client/network/ServerInfo;setResourcePackPolicy(Lnet/minecraft/client/network/ServerInfo$ResourcePackPolicy;)Vintermediary method_2995Lnet/minecraft/class_642;method_2995(Lnet/minecraft/class_642$class_643;)Vofficial aLhef;a(Lhef$a;)V
-
fromNbt
- Mappings:
Namespace Name Mixin selector named fromNbtLnet/minecraft/client/network/ServerInfo;fromNbt(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/client/network/ServerInfo;intermediary method_2993Lnet/minecraft/class_642;method_2993(Lnet/minecraft/class_2487;)Lnet/minecraft/class_642;official aLhef;a(Lva;)Lhef;
-
getFavicon
public byte @Nullable [] getFavicon()- Mappings:
Namespace Name Mixin selector named getFaviconLnet/minecraft/client/network/ServerInfo;getFavicon()[Bintermediary method_49306Lnet/minecraft/class_642;method_49306()[Bofficial cLhef;c()[B
-
setFavicon
public void setFavicon(byte @Nullable [] favicon) - Mappings:
Namespace Name Mixin selector named setFaviconLnet/minecraft/client/network/ServerInfo;setFavicon([B)Vintermediary method_49305Lnet/minecraft/class_642;method_49305([B)Vofficial aLhef;a([B)V
-
isLocal
public boolean isLocal()- Mappings:
Namespace Name Mixin selector named isLocalLnet/minecraft/client/network/ServerInfo;isLocal()Zintermediary method_2994Lnet/minecraft/class_642;method_2994()Zofficial dLhef;d()Z
-
isRealm
public boolean isRealm()- Mappings:
Namespace Name Mixin selector named isRealmLnet/minecraft/client/network/ServerInfo;isRealm()Zintermediary method_52811Lnet/minecraft/class_642;method_52811()Zofficial eLhef;e()Z
-
getServerType
- Mappings:
Namespace Name Mixin selector named getServerTypeLnet/minecraft/client/network/ServerInfo;getServerType()Lnet/minecraft/client/network/ServerInfo$ServerType;intermediary method_55616Lnet/minecraft/class_642;method_55616()Lnet/minecraft/class_642$class_8678;official fLhef;f()Lhef$c;
-
hasAcceptedCodeOfConduct
- Mappings:
Namespace Name Mixin selector named hasAcceptedCodeOfConductLnet/minecraft/client/network/ServerInfo;hasAcceptedCodeOfConduct(Ljava/lang/String;)Zintermediary method_73472Lnet/minecraft/class_642;method_73472(Ljava/lang/String;)Zofficial aLhef;a(Ljava/lang/String;)Z
-
setAcceptedCodeOfConduct
- Mappings:
Namespace Name Mixin selector named setAcceptedCodeOfConductLnet/minecraft/client/network/ServerInfo;setAcceptedCodeOfConduct(Ljava/lang/String;)Vintermediary method_73473Lnet/minecraft/class_642;method_73473(Ljava/lang/String;)Vofficial bLhef;b(Ljava/lang/String;)V
-
resetAcceptedCodeOfConduct
public void resetAcceptedCodeOfConduct()- Mappings:
Namespace Name Mixin selector named resetAcceptedCodeOfConductLnet/minecraft/client/network/ServerInfo;resetAcceptedCodeOfConduct()Vintermediary method_73474Lnet/minecraft/class_642;method_73474()Vofficial gLhef;g()V
-
copyFrom
- Mappings:
Namespace Name Mixin selector named copyFromLnet/minecraft/client/network/ServerInfo;copyFrom(Lnet/minecraft/client/network/ServerInfo;)Vintermediary method_44292Lnet/minecraft/class_642;method_44292(Lnet/minecraft/class_642;)Vofficial aLhef;a(Lhef;)V
-
copyWithSettingsFrom
- Mappings:
Namespace Name Mixin selector named copyWithSettingsFromLnet/minecraft/client/network/ServerInfo;copyWithSettingsFrom(Lnet/minecraft/client/network/ServerInfo;)Vintermediary method_2996Lnet/minecraft/class_642;method_2996(Lnet/minecraft/class_642;)Vofficial bLhef;b(Lhef;)V
-
getStatus
- Mappings:
Namespace Name Mixin selector named getStatusLnet/minecraft/client/network/ServerInfo;getStatus()Lnet/minecraft/client/network/ServerInfo$Status;intermediary method_55825Lnet/minecraft/class_642;method_55825()Lnet/minecraft/class_642$class_9083;official hLhef;h()Lhef$b;
-
setStatus
- Mappings:
Namespace Name Mixin selector named setStatusLnet/minecraft/client/network/ServerInfo;setStatus(Lnet/minecraft/client/network/ServerInfo$Status;)Vintermediary method_55824Lnet/minecraft/class_642;method_55824(Lnet/minecraft/class_642$class_9083;)Vofficial aLhef;a(Lhef$b;)V
-
validateFavicon
public static byte @Nullable [] validateFavicon(byte @Nullable [] favicon) - Mappings:
Namespace Name Mixin selector named validateFaviconLnet/minecraft/client/network/ServerInfo;validateFavicon([B)[Bintermediary method_53885Lnet/minecraft/class_642;method_53885([B)[Bofficial bLhef;b([B)[B
-