类 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 from the menu. The list of these servers is stored in theservers.datfile within the client game directory.- Mappings:
Namespace Name official eidintermediary net/minecraft/class_642named net/minecraft/client/network/ServerInfo
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classServerInfo.ResourcePackPolicyThe policy of the client when this server sends a server resource pack.
-
字段概要
字段 修饰符和类型 字段 说明 Stringaddressprivate @Nullable StringiconTextlabelprivate booleanlocalStringnamebooleanonlinelongpingTextplayerCountLabelList<Text>playerListSummaryintprotocolVersionprivate ServerInfo.ResourcePackPolicyresourcePackPolicyTextversion
-
构造器概要
构造器 构造器 说明 ServerInfo(String name, String address, boolean local)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidcopyFrom(ServerInfo serverInfo)static ServerInfofromNbt(CompoundTag root)@Nullable StringgetIcon()ServerInfo.ResourcePackPolicygetResourcePackPolicy()Returns the policy on resource packs sent by this server.booleanisLocal()voidsetIcon(@Nullable String icon)voidsetResourcePackPolicy(ServerInfo.ResourcePackPolicy policy)Sets the resource pack policy on this server.CompoundTagtoNbt()
-
-
-
字段详细资料
-
name
public String name
- Mappings:
Namespace Name Mixin selector official aLeid;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
public String address
- Mappings:
Namespace Name Mixin selector official bLeid;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
public Text playerCountLabel
- Mappings:
Namespace Name Mixin selector official cLeid;c:Lon;intermediary field_3753Lnet/minecraft/class_642;field_3753:Lnet/minecraft/class_2561;named playerCountLabelLnet/minecraft/client/network/ServerInfo;playerCountLabel:Lnet/minecraft/text/Text;
-
label
public Text label
- Mappings:
Namespace Name Mixin selector official dLeid;d:Lon;intermediary field_3757Lnet/minecraft/class_642;field_3757:Lnet/minecraft/class_2561;named labelLnet/minecraft/client/network/ServerInfo;label:Lnet/minecraft/text/Text;
-
ping
public long ping
- Mappings:
Namespace Name Mixin selector official eLeid;e: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 fLeid;f:Iintermediary field_3756Lnet/minecraft/class_642;field_3756:Inamed protocolVersionLnet/minecraft/client/network/ServerInfo;protocolVersion:I
-
version
public Text version
- Mappings:
Namespace Name Mixin selector official gLeid;g:Lon;intermediary field_3760Lnet/minecraft/class_642;field_3760:Lnet/minecraft/class_2561;named versionLnet/minecraft/client/network/ServerInfo;version:Lnet/minecraft/text/Text;
-
online
public boolean online
- Mappings:
Namespace Name Mixin selector official hLeid;h:Zintermediary field_3754Lnet/minecraft/class_642;field_3754:Znamed onlineLnet/minecraft/client/network/ServerInfo;online:Z
-
playerListSummary
public List<Text> playerListSummary
- Mappings:
Namespace Name Mixin selector official iLeid;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
private ServerInfo.ResourcePackPolicy resourcePackPolicy
- Mappings:
Namespace Name Mixin selector official jLeid;j:Leid$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;
-
icon
@Nullable private @Nullable String icon
- Mappings:
Namespace Name Mixin selector official kLeid;k:Ljava/lang/String;intermediary field_3759Lnet/minecraft/class_642;field_3759:Ljava/lang/String;named iconLnet/minecraft/client/network/ServerInfo;icon:Ljava/lang/String;
-
local
private boolean local
- Mappings:
Namespace Name Mixin selector official lLeid;l:Zintermediary field_3763Lnet/minecraft/class_642;field_3763:Znamed localLnet/minecraft/client/network/ServerInfo;local:Z
-
-
构造器详细资料
-
ServerInfo
public ServerInfo(String name, String address, boolean local)
- Mappings:
Namespace Name Mixin selector official <init>Leid;<init>(Ljava/lang/String;Ljava/lang/String;Z)Vintermediary <init>Lnet/minecraft/class_642;<init>(Ljava/lang/String;Ljava/lang/String;Z)Vnamed <init>Lnet/minecraft/client/network/ServerInfo;<init>(Ljava/lang/String;Ljava/lang/String;Z)V
-
-
方法详细资料
-
toNbt
public CompoundTag toNbt()
- Mappings:
Namespace Name Mixin selector official aLeid;a()Lmv;intermediary method_2992Lnet/minecraft/class_642;method_2992()Lnet/minecraft/class_2487;named toNbtLnet/minecraft/client/network/ServerInfo;toNbt()Lnet/minecraft/nbt/CompoundTag;
-
getResourcePackPolicy
public ServerInfo.ResourcePackPolicy getResourcePackPolicy()
Returns the policy on resource packs sent by this server.- Mappings:
Namespace Name Mixin selector official bLeid;b()Leid$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
public void setResourcePackPolicy(ServerInfo.ResourcePackPolicy policy)
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 aLeid;a(Leid$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
public static ServerInfo fromNbt(CompoundTag root)
- Mappings:
Namespace Name Mixin selector official aLeid;a(Lmv;)Leid;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/CompoundTag;)Lnet/minecraft/client/network/ServerInfo;
-
getIcon
@Nullable public @Nullable String getIcon()
- Mappings:
Namespace Name Mixin selector official cLeid;c()Ljava/lang/String;intermediary method_2991Lnet/minecraft/class_642;method_2991()Ljava/lang/String;named getIconLnet/minecraft/client/network/ServerInfo;getIcon()Ljava/lang/String;
-
setIcon
public void setIcon(@Nullable @Nullable String icon)
- Mappings:
Namespace Name Mixin selector official aLeid;a(Ljava/lang/String;)Vintermediary method_2989Lnet/minecraft/class_642;method_2989(Ljava/lang/String;)Vnamed setIconLnet/minecraft/client/network/ServerInfo;setIcon(Ljava/lang/String;)V
-
isLocal
public boolean isLocal()
- Mappings:
Namespace Name Mixin selector official dLeid;d()Zintermediary method_2994Lnet/minecraft/class_642;method_2994()Znamed isLocalLnet/minecraft/client/network/ServerInfo;isLocal()Z
-
copyFrom
public void copyFrom(ServerInfo serverInfo)
- Mappings:
Namespace Name Mixin selector official aLeid;a(Leid;)Vintermediary method_2996Lnet/minecraft/class_642;method_2996(Lnet/minecraft/class_642;)Vnamed copyFromLnet/minecraft/client/network/ServerInfo;copyFrom(Lnet/minecraft/client/network/ServerInfo;)V
-
-