类 NetworkContext
java.lang.Object
net.minecraftforge.network.NetworkContext
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private static final io.netty.util.AttributeKey
<NetworkContext> (专用程序包) Map
<ResourceLocation, Integer> private final Connection
private static final String
(专用程序包) Map
<String, ModVersions.Info> private Map
<String, ModVersions.Info> static final int
private int
(专用程序包) Set
<ResourceLocation> private Set
<ResourceLocation> (专用程序包) Set
<ResourceLocation> private ConnectionType
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static String
enhanceHostName
(String hostName) This is a hint that we are a modded client, This is sent in the first packet the client sends to the server.void
static NetworkContext
get
(Connection connection) Gets the associated NetworkContext from the connection, creating a new instance if necessary.A list of mods and their verisons reported by the other side of the connection.int
getType()
void
processIntention
(String hostName) (专用程序包) void
-
字段详细资料
-
MARKER
- 另请参阅:
-
NET_VERSION
public static final int NET_VERSION- 另请参阅:
-
CHANNEL_KEY
-
connection
-
type
-
netVersion
private int netVersion -
remoteChannels
-
remoteChannelsView
-
sentChannels
-
modList
-
modListView
-
channelList
-
mismatchData
-
-
构造器详细资料
-
NetworkContext
-
-
方法详细资料
-
get
Gets the associated NetworkContext from the connection, creating a new instance if necessary. -
getType
-
getNetVersion
public int getNetVersion() -
getRemoteChannels
-
getModList
A list of mods and their verisons reported by the other side of the connection. The remote side can and does lie about this, so not rely on it for any anti-cheat system. -
enhanceHostName
This is a hint that we are a modded client, This is sent in the first packet the client sends to the server. Unfortunately we do not have a modder facing value in this packet, so we have a long standing tradition of encoding it on the hostName field, which is a UTF string. Forge treats this string a null terminated list. With our value being anywhere in the list. Our identifier is currently FORGE, Optionally followed by a number indicating the network version. If the version is missing, we assume 0. TODO: Move out of the Intention packet and into a immediately sent Login custom payload? Which should arrive before we get to config stage? -
processIntention
-
finishTask
-
getMismatchs
-
setConnectionType
-