public class NetworkRegistry
extends java.lang.Object
修飾子とタイプ | クラスと説明 |
---|---|
static class |
NetworkRegistry.ChannelBuilder
Builder for constructing network channels using a builder style API.
|
static class |
NetworkRegistry.LoginPayload
Tracks individual outbound messages for dispatch to clients during login handling.
|
修飾子とタイプ | フィールドと説明 |
---|---|
static java.lang.String |
ABSENT
Special value for clientAcceptedVersions and serverAcceptedVersions predicates indicating the other side lacks
this channel.
|
static java.lang.String |
ACCEPTVANILLA |
コンストラクタと説明 |
---|
NetworkRegistry() |
修飾子とタイプ | メソッドと説明 |
---|---|
static boolean |
acceptsVanillaClientConnections() |
static boolean |
canConnectToVanillaServer() |
static boolean |
checkListPingCompatibilityForClient(java.util.Map<ResourceLocation,org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.Boolean>> incoming) |
static java.util.List<java.lang.String> |
getClientNonVanillaNetworkMods() |
static java.util.List<java.lang.String> |
getServerNonVanillaNetworkMods() |
boolean |
isLocked() |
static void |
lock() |
static EventNetworkChannel |
newEventChannel(ResourceLocation name,
java.util.function.Supplier<java.lang.String> networkProtocolVersion,
java.util.function.Predicate<java.lang.String> clientAcceptedVersions,
java.util.function.Predicate<java.lang.String> serverAcceptedVersions)
Create a new
EventNetworkChannel . |
static SimpleChannel |
newSimpleChannel(ResourceLocation name,
java.util.function.Supplier<java.lang.String> networkProtocolVersion,
java.util.function.Predicate<java.lang.String> clientAcceptedVersions,
java.util.function.Predicate<java.lang.String> serverAcceptedVersions)
Create a new
SimpleChannel . |
public static java.lang.String ABSENT
public static java.lang.String ACCEPTVANILLA
public static java.util.List<java.lang.String> getServerNonVanillaNetworkMods()
public static java.util.List<java.lang.String> getClientNonVanillaNetworkMods()
public static boolean acceptsVanillaClientConnections()
public static boolean canConnectToVanillaServer()
public static SimpleChannel newSimpleChannel(ResourceLocation name, java.util.function.Supplier<java.lang.String> networkProtocolVersion, java.util.function.Predicate<java.lang.String> clientAcceptedVersions, java.util.function.Predicate<java.lang.String> serverAcceptedVersions)
SimpleChannel
.name
- The registry name for this channel. Must be uniquenetworkProtocolVersion
- The network protocol version string that will be offered to the remote side NetworkRegistry.ChannelBuilder.networkProtocolVersion(Supplier)
clientAcceptedVersions
- Called on the client with the networkProtocolVersion string from the server NetworkRegistry.ChannelBuilder.clientAcceptedVersions(Predicate)
serverAcceptedVersions
- Called on the server with the networkProtocolVersion string from the client NetworkRegistry.ChannelBuilder.serverAcceptedVersions(Predicate)
SimpleChannel
newSimpleChannel(ResourceLocation, Supplier, Predicate, Predicate)
public static EventNetworkChannel newEventChannel(ResourceLocation name, java.util.function.Supplier<java.lang.String> networkProtocolVersion, java.util.function.Predicate<java.lang.String> clientAcceptedVersions, java.util.function.Predicate<java.lang.String> serverAcceptedVersions)
EventNetworkChannel
.name
- The registry name for this channel. Must be uniquenetworkProtocolVersion
- The network protocol version string that will be offered to the remote side NetworkRegistry.ChannelBuilder.networkProtocolVersion(Supplier)
clientAcceptedVersions
- Called on the client with the networkProtocolVersion string from the server NetworkRegistry.ChannelBuilder.clientAcceptedVersions(Predicate)
serverAcceptedVersions
- Called on the server with the networkProtocolVersion string from the client NetworkRegistry.ChannelBuilder.serverAcceptedVersions(Predicate)
EventNetworkChannel
newEventChannel(ResourceLocation, Supplier, Predicate, Predicate)
public static boolean checkListPingCompatibilityForClient(java.util.Map<ResourceLocation,org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.Boolean>> incoming)
public boolean isLocked()
public static void lock()