Jump to content

EAirPeter

Members
  • Posts

    4
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    Nothing here!

EAirPeter's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. er... Just do some check, make sure client and server have same script file(a part of mod, but be allowed to be modified by any text editor) If they mismatched, the player would be kicked
  2. The log shown in #1 indicates, "send to server" is after "[server thread] Server side modded connection established". However... The server doesn't receive that packet. And, your solution means i have to give up sending message just after handshaking? It would be appreciated if i can send that as early as possible... By the way, I have tried this way: 1. Handle ClientConnectedToServer, and wait for 60ticks (of course, by tickcount and handling ClientTickEvent) 2. Send the packet 3. So, server does receive the packet.... But.... " It would be appreciated if i can send that as early as possible..." I mean... just after handshaking, or some way to inject the handshaking procedure? Thanks for everyone's help...
  3. Yes. But i don't very understand the relationship between EntityPlayer and SimpleNetworkWrapper... I supposed..when ClientConnectedToServerEvent is fired, the SimpleNetworkWrapper in LIUtils is ready. The netHandler is created like this: public static SimpleNetworkWrapper netHandler = NetworkRegistry.INSTANCE.newSimpleChannel("LIUtils");
  4. I want to send some information just after the handshake completed(handling ClientConnectedToServerEvent), and the mod on server side will check the information and do something. The problem is, the server never receives the message sent during ClientConnectedToServerEvent. The code is shown below: @SubscribeEvent public void onClientConnectedToServer(ClientConnectedToServerEvent event) { if (event.connectionType.equals("MODDED")) { FMLLog.info("send to server"); LIUtils.netHandler.sendToServer(message()); } } Actually, I get my FMLLog: [00:12:19] [Netty Client IO #2/DEBUG] [FML/]: Server FML protocol version 2, 4 byte dimension received 0 [00:12:19] [Netty Client IO #2/TRACE] [FML/]: $ServerHello->FMLHandshakeClientState$2:HELLO [00:12:19] [Netty Client IO #2/INFO] [FML/]: Server protocol version 2 [00:12:19] [Netty Client IO #2/DEBUG] [FML/]: Received override dimension 0 [00:12:19] [Netty IO #5/TRACE] [FML/]: $ClientHello->FMLHandshakeServerState$2:HELLO [00:12:19] [Netty IO #5/INFO] [FML/]: Client protocol version 2 [00:12:19] [Netty IO #5/TRACE] [FML/]: $ModList:7 mods->FMLHandshakeServerState$2:HELLO [00:12:19] [Netty IO #5/INFO] [FML/]: Client attempting to join with 7 mods : [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected] [00:12:19] [Netty IO #5/INFO] [FML/]: Attempting connection with missing mods [] at CLIENT [00:12:19] [Netty Client IO #2/TRACE] [FML/]: $ModList:7 mods->FMLHandshakeClientState$3:WAITINGSERVERDATA [00:12:19] [Netty Client IO #2/INFO] [FML/]: Attempting connection with missing mods [] at SERVER [00:12:19] [Netty IO #5/TRACE] [FML/]: $HandshakeAck:{2}->FMLHandshakeServerState$3:WAITINGCACK [00:12:19] [Netty Client IO #2/TRACE] [FML/]: $HandshakeAck:{2}->FMLHandshakeClientState$5:PENDINGCOMPLETE [00:12:19] [Netty IO #5/TRACE] [FML/]: $HandshakeAck:{4}->FMLHandshakeServerState$4:COMPLETE [00:12:19] [Netty Client IO #2/TRACE] [FML/]: $HandshakeAck:{3}->FMLHandshakeClientState$6:COMPLETE [00:12:19] [Netty IO #5/TRACE] [FML/]: $HandshakeAck:{5}->FMLHandshakeServerState$5:DONE [00:12:20] [server thread/INFO] [FML/]: [server thread] Server side modded connection established [00:12:20] [Client thread/DEBUG] [FML/]: The fluid minecraft:lava has been selected as the default fluid for lava [00:12:20] [Client thread/DEBUG] [FML/]: The fluid minecraft:water has been selected as the default fluid for water [00:12:20] [Client thread/DEBUG] [FML/]: The fluid LIUtils:imagproj has been selected as the default fluid for imagproj [00:12:20] [Client thread/INFO] [FML/]: [Client thread] Client side modded connection established [00:12:20] [Client thread/INFO] [FML/]: send to server [00:12:20] [Client thread/DEBUG] [FML/]: Overriding dimension: using 0 However, it just doesn't receive the message i want.... It would be appreciated if someone can help me, thanks!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.