Package net.minecraftforge.network
Class NetworkRegistry
java.lang.Object
net.minecraftforge.network.NetworkRegistry
Tracks channels created by
ChannelBuilder
. This class is not intended for use by modders.-
Field Summary
Modifier and TypeFieldDescriptionprivate static Map
<ResourceLocation, NetworkInstance> private static Map
<ResourceLocation, NetworkInstance> (package private) static boolean
(package private) static final org.apache.logging.log4j.Logger
(package private) static final org.apache.logging.log4j.Marker
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static Map
<ResourceLocation, Integer> (package private) static Map
<ResourceLocation, ServerStatusPing.ChannelData> (package private) static List
<ResourceLocation> static boolean
static boolean
private static void
checkLock
(NetworkInstance instance) private static void
static @Nullable NetworkInstance
findTarget
(ResourceLocation resourceLocation) listRejectedVanillaMods
(Function<NetworkInstance, Channel.VersionTest> testFunction) static void
lock()
static void
onConnectionStart
(Connection connection) (package private) static void
register
(NetworkInstance instance) (package private) static void
register
(NetworkInstance instance, ResourceLocation name) static @Nullable NetworkContext.NetworkMismatchData
validateChannels
(Map<ResourceLocation, Integer> incoming, boolean fromClient)
-
Field Details
-
LOGGER
static final org.apache.logging.log4j.Logger LOGGER -
NETREGISTRY
static final org.apache.logging.log4j.Marker NETREGISTRY -
instances
-
byName
-
lock
static boolean lock
-
-
Constructor Details
-
NetworkRegistry
public NetworkRegistry()
-
-
Method Details
-
acceptsVanillaClientConnections
public static boolean acceptsVanillaClientConnections() -
canConnectToVanillaServer
public static boolean canConnectToVanillaServer() -
findTarget
-
buildChannelVersionsForListPing
-
listRejectedVanillaMods
static List<String> listRejectedVanillaMods(Function<NetworkInstance, Channel.VersionTest> testFunction) -
validateChannels
@Nullable public static @Nullable NetworkContext.NetworkMismatchData validateChannels(Map<ResourceLocation, Integer> incoming, boolean fromClient) -
checkListPingCompatibilityForClient
public static boolean checkListPingCompatibilityForClient(Map<ResourceLocation, ServerStatusPing.ChannelData> incoming) -
lock
public static void lock() -
onConnectionStart
-
buildChannelVersions
-
buildRegisterList
-
register
-
register
-
checkLock
-
error
-