Fix forge support - #111
This commit is contained in:
parent
0451c35bf8
commit
bef2818537
@ -61,7 +61,11 @@ public class DataInputPacketReader
|
||||
|
||||
private static void readPacket(int packetId, DataInput in, byte[] buffer, int protocol) throws IOException
|
||||
{
|
||||
Instruction[] packetDef = instructions[packetId + protocol];
|
||||
Instruction[] packetDef = null;
|
||||
if ( packetId + protocol < instructions.length )
|
||||
{
|
||||
packetDef = instructions[packetId + protocol];
|
||||
}
|
||||
|
||||
if ( packetDef == null )
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ public class InitialHandler extends PacketHandler implements Runnable, PendingCo
|
||||
@Override
|
||||
public void handle(Packet1Login login) throws Exception
|
||||
{
|
||||
Preconditions.checkState( thisState == State.HANDSHAKE, "Not expecting FORGE LOGIN" );
|
||||
Preconditions.checkState( thisState == State.LOGIN, "Not expecting FORGE LOGIN" );
|
||||
Preconditions.checkState( forgeLogin == null, "Already received FORGE LOGIN" );
|
||||
forgeLogin = login;
|
||||
stream.setProtocol( PacketDefinitions.FORGE_PROTOCOL );
|
||||
|
Loading…
Reference in New Issue
Block a user