File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
android/app/src/main/java/com/enderchat/modules/connection Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -343,9 +343,9 @@ class ConnectionModule(reactContext: ReactApplicationContext)
343343 // Remove upstream listeners, stop unnecessary background tasks
344344 }
345345
346- /* private fun println(log: Any?) {
346+ private fun println (log : Any? ) {
347347 sendEvent(reactContext = reactApplicationContext, " ecm:log" , Arguments .createMap().apply {
348348 putString(" log" , log.toString())
349349 })
350- } */
350+ }
351351}
Original file line number Diff line number Diff line change @@ -102,12 +102,13 @@ export class NativeServerConnection extends events.EventEmitter implements Serve
102102 packet . id === packetIds . CLIENTBOUND_LOGIN_SUCCESS ( version ) &&
103103 this . state === ConnectionState . LOGIN
104104 ) {
105- this . state =
106- version >= protocolMap [ '1.20.2' ] ? ConnectionState . CONFIGURATION : ConnectionState . PLAY
107- this . writePacket (
108- packetIds . SERVERBOUND_LOGIN_ACKNOWLEDGED ( version ) ?? 0 ,
109- Buffer . alloc ( 0 ) ,
110- ) . catch ( ( err : unknown ) => this . emit ( 'error' , err ) )
105+ if ( version >= protocolMap [ '1.20.2' ] ) {
106+ this . state = ConnectionState . CONFIGURATION
107+ this . writePacket (
108+ packetIds . SERVERBOUND_LOGIN_ACKNOWLEDGED ( version ) ?? 0 ,
109+ Buffer . alloc ( 0 ) ,
110+ ) . catch ( ( err : unknown ) => this . emit ( 'error' , err ) )
111+ } else this . state = ConnectionState . PLAY
111112 } else if (
112113 packet . id === packetIds . CLIENTBOUND_FINISH_CONFIGURATION ( version ) &&
113114 this . state === ConnectionState . CONFIGURATION
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const packetIds = {
2323 SERVERBOUND_LOGIN_START : generateIdFunction ( [ [ protocolMap [ '1.16.4' ] , 0x00 ] ] ) ,
2424 SERVERBOUND_ENCRYPTION_RESPONSE : generateIdFunction ( [ [ protocolMap [ '1.16.4' ] , 0x01 ] ] ) ,
2525 SERVERBOUND_LOGIN_PLUGIN_RESPONSE : generateIdFunction ( [ [ protocolMap [ '1.16.4' ] , 0x02 ] ] ) ,
26- SERVERBOUND_LOGIN_ACKNOWLEDGED : generateIdFunction ( [ [ protocolMap [ '1.16.4 ' ] , 0x03 ] ] ) ,
26+ SERVERBOUND_LOGIN_ACKNOWLEDGED : generateIdFunction ( [ [ protocolMap [ '1.20.2 ' ] , 0x03 ] ] ) ,
2727
2828 // ===========================
2929 // Clientbound (configuration)
You can’t perform that action at this time.
0 commit comments