Initial test

This commit is contained in:
Anuken
2018-08-25 20:43:36 -04:00
parent 15378d3267
commit 926e61b7cc
3 changed files with 26 additions and 18 deletions

View File

@@ -35,9 +35,8 @@ public class ByteSerializer implements Serialization {
if(id == -2){
return FrameworkSerializer.read(byteBuffer);
}else{
Class<?> type = Registrator.getByID(id);
synchronized (packetPoolLock) {
Packet packet = (Packet) Pooling.obtain(type);
Packet packet = (Packet) Pooling.obtain(Registrator.getByID(id).type);
packet.read(byteBuffer);
return packet;
}