Skip to content

Commit c6d32ff

Browse files
committed
fix: FML1 sign should be "\0FML\0"
1 parent 0aacfe4 commit c6d32ff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/proxy.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,10 @@ export class MinecraftProxy {
493493

494494
// 构造握手包
495495
const remoteHostWithFML =
496-
clientSocket.data.FML! > 0
497-
? `${clientSocket.data.realRemoteHost}\0FML${clientSocket.data.FML}\0`
496+
clientSocket.data.FML === 1
497+
? `${clientSocket.data.realRemoteHost}\0FML\0`
498+
: clientSocket.data.FML === 2
499+
? `${clientSocket.data.realRemoteHost}\0FML2\0`
498500
: clientSocket.data.realRemoteHost!
499501
const handshake = new PacketWriter(0x0)
500502
handshake.writeVarInt(clientSocket.data.protocol)

0 commit comments

Comments
 (0)