Advancing further in the login process.
This commit is contained in:
@@ -12,6 +12,6 @@ public class BulkChunk extends Instruction
|
||||
short count = in.readShort();
|
||||
int size = in.readInt();
|
||||
in.readBoolean();
|
||||
skip( in, size + count * 12 );
|
||||
in.skipBytes( size + count * 12 );
|
||||
}
|
||||
}
|
||||
|
@@ -28,9 +28,4 @@ abstract class Instruction
|
||||
static final Instruction BYTE_INT = new ByteHeader( INT );
|
||||
|
||||
abstract void read(ByteBuf in) throws IOException;
|
||||
|
||||
final void skip(ByteBuf in, int len) throws IOException
|
||||
{
|
||||
in.readerIndex( in.readerIndex() + len );
|
||||
}
|
||||
}
|
||||
|
@@ -12,7 +12,7 @@ class Item extends Instruction
|
||||
short type = in.readShort();
|
||||
if ( type >= 0 )
|
||||
{
|
||||
skip( in, 3 );
|
||||
in.skipBytes( 3 );
|
||||
SHORT_BYTE.read( in );
|
||||
}
|
||||
}
|
||||
|
@@ -20,6 +20,6 @@ class Jump extends Instruction
|
||||
@Override
|
||||
void read(ByteBuf in) throws IOException
|
||||
{
|
||||
skip( in, len );
|
||||
in.skipBytes( len );
|
||||
}
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ class MetaData extends Instruction
|
||||
ITEM.read( in );
|
||||
break;
|
||||
case 6:
|
||||
skip( in, 12 ); // int, int, int
|
||||
in.skipBytes( 12 ); // int, int, int
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException( "Unknown metadata type " + type );
|
||||
|
@@ -12,7 +12,7 @@ class OptionalMotion extends Instruction
|
||||
int data = in.readInt();
|
||||
if ( data > 0 )
|
||||
{
|
||||
skip( in, 6 );
|
||||
in.skipBytes( 6 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -10,6 +10,6 @@ class UnsignedShortByte extends Instruction
|
||||
void read(ByteBuf in) throws IOException
|
||||
{
|
||||
int size = in.readUnsignedShort();
|
||||
skip( in, size );
|
||||
in.skipBytes( size );
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user