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)
343
343
// Remove upstream listeners, stop unnecessary background tasks
344
344
}
345
345
346
- /* private fun println(log: Any?) {
346
+ private fun println (log : Any? ) {
347
347
sendEvent(reactContext = reactApplicationContext, " ecm:log" , Arguments .createMap().apply {
348
348
putString(" log" , log.toString())
349
349
})
350
- } */
350
+ }
351
351
}
Original file line number Diff line number Diff line change @@ -102,12 +102,13 @@ export class NativeServerConnection extends events.EventEmitter implements Serve
102
102
packet . id === packetIds . CLIENTBOUND_LOGIN_SUCCESS ( version ) &&
103
103
this . state === ConnectionState . LOGIN
104
104
) {
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
111
112
} else if (
112
113
packet . id === packetIds . CLIENTBOUND_FINISH_CONFIGURATION ( version ) &&
113
114
this . state === ConnectionState . CONFIGURATION
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const packetIds = {
23
23
SERVERBOUND_LOGIN_START : generateIdFunction ( [ [ protocolMap [ '1.16.4' ] , 0x00 ] ] ) ,
24
24
SERVERBOUND_ENCRYPTION_RESPONSE : generateIdFunction ( [ [ protocolMap [ '1.16.4' ] , 0x01 ] ] ) ,
25
25
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 ] ] ) ,
27
27
28
28
// ===========================
29
29
// Clientbound (configuration)
You can’t perform that action at this time.
0 commit comments