mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-15 17:44:42 +00:00
Refactored readUnsigned<x> to readU<x>
This commit is contained in:
1 parent
fed626df0b
commit
a003f2638d
3 files changed
+7
-8
No files matched your search
@@ -10,9 +10,9 @@ public interface MCDataInput
|
||||
public long readLong();
|
||||
public int readInt();
|
||||
public short readShort();
|
||||
public int readUnsignedShort();
|
||||
public int readUShort();
|
||||
public byte readByte();
|
||||
public int readUnsignedByte();
|
||||
public int readUByte();
|
||||
public double readDouble();
|
||||
public float readFloat();
|
||||
public boolean readBoolean();
|
||||
|
||||
@@ -162,7 +162,7 @@ public class NBTDataWrapper implements MCDataInput, MCDataOutput
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readUnsignedShort()
|
||||
public int readUShort()
|
||||
{
|
||||
return ((NBTTagShort)readTag()).data & 0xFFFF;
|
||||
}
|
||||
@@ -174,7 +174,7 @@ public class NBTDataWrapper implements MCDataInput, MCDataOutput
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readUnsignedByte()
|
||||
public int readUByte()
|
||||
{
|
||||
return ((NBTTagByte)readTag()).data & 0xFF;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user