public void receiveData() throws IOException {
        byte code = getDataInputStream().readByte();

        if(code == 0) { // Move entity packet
            long id = getDataInputStream().readLong();
            Entity entity = getEntityGroup().getEntityById(id);

            float x = getDataInputStream().readFloat();
            float y = getDataInputStream().readFloat();
            float z = getDataInputStream().readFloat();

            entity.setPosition(x, y, z);
        }

        else if(code == 1) { // Rotate entity packet
            long id = getDataInputStream().readLong();
            Entity entity = getEntityGroup().getEntityById(id);

            float x = getDataInputStream().readFloat();
            float y = getDataInputStream().readFloat();
            float z = getDataInputStream().readFloat();

            entity.setRotation(x, y, z);
        }

        else if(code == 2) {

        }

        if(code == 4) { // Spawn entity packet
            long id = getDataInputStream().readLong();
            Entity entity = getEntityGroup().getEntityById(id);

            float x = getDataInputStream().readFloat();
            float y = getDataInputStream().readFloat();
            float z = getDataInputStream().readFloat();

            entity.setPosition(x, y, z);
        }
    }