Skip to content

Commit 582eb3e

Browse files
don't rely on customblocksupportlevel packet being first packet received from client.
1 parent b30164e commit 582eb3e

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

fCraft/Network/Player.Handshake.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -402,16 +402,6 @@ bool NegotiateProtocolExtension() {
402402
}
403403
}
404404

405-
// Expect CustomBlockSupportLevel reply
406-
OpCode customBlockSupportLevelReply = reader.ReadOpCode();
407-
//Logger.Log( LogType.Debug, "Expected: {0} / Received: {1}", OpCode.CustomBlockSupportLevel, customBlockSupportLevelReply );
408-
if (customBlockSupportLevelReply != OpCode.CustomBlockSupportLevel) {
409-
Logger.Log(LogType.Warning, "Player {0} from {1}: Unexpected CustomBlockSupportLevel reply ({2})",
410-
Info.Name, IP, customBlockSupportLevelReply);
411-
return false;
412-
}
413-
byte clientLevel = reader.ReadByte();
414-
//UsesCustomBlocks = (clientLevel >= CustomBlocksLevel);
415405
return true;
416406
}
417407
#endregion

fCraft/Network/Player.Networking.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,10 @@ void IoLoop() {
272272
case OpCode.SetBlockClient:
273273
ProcessSetBlockPacket();
274274
break;
275+
276+
case OpCode.CustomBlockSupportLevel:
277+
byte clientLevel = reader.ReadByte();
278+
break;
275279

276280
case OpCode.PlayerClick:
277281
ProcessPlayerClickPacket();

0 commit comments

Comments
 (0)