public void moveToEx(float x, float y, int random) throws IOException {
        LOG.debug("Moving to {} {} (and waiting until we reach it, until we're blocked or dead)");
        int blocked = 0;

        int status = this.getMapLoading();
        this.moveEx(x, y, random);
        pingSleep(0);

        float distanceToTarget = 0;
        do {
            try {
                Thread.sleep(150);
            } catch (InterruptedException ex) {
                // ignore
            }
            boolean isDead = this.isDead();
            if (isDead) {
                LOG.debug("The player is dead");
                break;
            }

            int oldStatus = status;
            status = this.getMapLoading();

            if (oldStatus != status) {
                break;
            }

            boolean isMoving = this.isMoving(-2);

            if (!isMoving) {
                LOG.debug("Blocked");
                blocked++;
                this.moveEx(x, y, random);
            }

            float[] newCoords = this.getCoords(-2);

            distanceToTarget = this.computeDistanceEx(newCoords[0], newCoords[1], x, y);
        } while (distanceToTarget > 220 && blocked < 14);
        
        LOG.debug("Moved");
    }