![]() ![]() The third and fourth arguments respectively are Predicate checking whether an incoming connection protocol version is network-compatible with the client or server, respectively. The second argument is a Supplier returning the current network protocol version. ![]() The first argument is a name for the channel. Public static final SimpleChannel INSTANCE = NetworkRegistry.newSimpleChannel( Create your SimpleChannel as a static field in this class, like so: private static final String PROTOCOL_VERSION = "1" We recommend that you do this in a separate class, possibly something like ModidPacketHandler. Getting Startedįirst you need to create your SimpleChannel object. ![]() Using this system is by far the easiest way to send custom data between clients and the server. SimpleImpl is the name given to the packet system that revolves around the SimpleChannel class. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |