t.setId(tiles.getMaxId());
t.setId(tiles.getMaxId() + 1);
    public int addTile(Tile t) {        if (t.getId() < 0) {            t.setId(tiles.getMaxId());        }        if (tileDimensions.width < t.getWidth()) {            tileDimensions.width = t.getWidth();        }        if (tileDimensions.height < t.getHeight()) {            tileDimensions.height = t.getHeight();        }        // Add any default properties        // TODO: use parent properties instead?        t.getProperties().putAll(defaultTileProperties);        tiles.put(t.getId(), t);        t.setTileSet(this);        return t.getId();    }