Refactored readUnsigned<x> to readU<x>

This commit is contained in:
Chicken Bones committed 2013-07-22 19:10:53 +10:00
1 parent fed626df0b
commit a003f2638d
3 files changed
+7 -8

No files matched your search

+3 -4
View File
@@ -739,12 +739,12 @@ public final class PacketCustom implements MCDataInput, MCDataOutput
}
}
public int readUnsignedByte()
public int readUByte()
{
return readByte() & 0xFF;
}
public int readUnsignedShort()
public int readUShort()
{
return readShort() & 0xFFFF;
}
@@ -859,9 +859,8 @@ public final class PacketCustom implements MCDataInput, MCDataOutput
int length = datain.readUnsignedShort();
char[] chars = new char[length];
for(int i = 0; i < length; i++)
{
chars[i] = readChar();
}
return new String(chars);
}
catch(IOException e)