public static void createChannels() {
channels = NetworkRegistry.INSTANCE.newChannel(networkChannelName, new PacketHandler());
for(Side side:Side.values()) {
FMLEmbeddedChannel channel = channels.get(side);
String type = channel.findChannelHandlerNameForType(PacketHandler.class);
channel.pipeline().addAfter(type, PacketInboundHandler.class.getName(), new PacketInboundHandler());
}
}
public static void sendPacketToServer(ModernPacket packet) {
if(MainProxy.isServer()) {