Package net.minecraftforge.network
Class ConnectionData
java.lang.Object
net.minecraftforge.network.ConnectionData
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
A class for holding the mod mismatch data of a failed handshake. -
Field Summary
-
Constructor Summary
ConstructorDescriptionConnectionData
(Map<String, org.apache.commons.lang3.tuple.Pair<String, String>> modData, Map<ResourceLocation, String> channels) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableMap<ResourceLocation,
String> Returns the list of impl channels present in the remote.Returns a map of mods and respective mod names and versions present in the remote.com.google.common.collect.ImmutableList<String>
Returns the list of mods present in the remote.
-
Field Details
-
modData
-
channels
-
-
Constructor Details
-
ConnectionData
-
-
Method Details
-
getModList
Returns the list of mods present in the remote. WARNING: This list is not authoritative. A mod missing from the list does not mean the mod isn't there, and similarly a mod present in the list does not mean it is there. People using hacked clients WILL hack the mod lists to make them look correct. Do not use this as an anti-cheat feature!- Returns:
- An immutable list of MODIDs
-
getModData
public com.google.common.collect.ImmutableMap<String,org.apache.commons.lang3.tuple.Pair<String, getModData()String>> Returns a map of mods and respective mod names and versions present in the remote. WARNING: This list is not authoritative. A mod missing from the list does not mean the mod isn't there, and similarly a mod present in the list does not mean it is there. People using hacked clients WILL hack the mod lists to make them look correct. Do not use this as an anti-cheat feature!- Returns:
- An immutable map of MODIDs and their respective mod versions
-
getChannels
Returns the list of impl channels present in the remote. WARNING: This list is not authoritative. A channel missing from the list does not mean the remote won't accept packets with that channel ID, and similarly a channel present in the list does not mean the remote won't ignore it. People using hacked clients WILL hack the channel list to make it look correct. Do not use this as an anti-cheat feature!- Returns:
- An immutable map of channel IDs and their respective protocol versions.
-