Ok it's a bug, here is the modified code. Sorry I'm not able to make a patch:) This is the constructor of TileSet
Code:
this.map = map;
// WRONG: here "element" is the node from TiledMap
// name = element.getAttribute("name");
firstGID = Integer.parseInt(element.getAttribute("firstgid"));
String source = element.getAttribute("source");
if ((source != null) && (!source.equals(""))) {
try {
InputStream in = ResourceLoader.getResourceAsStream(map.getTilesLocation() + "/" + source);
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.parse(in);
Element docElement = doc.getDocumentElement();
element = docElement; //(Element) docElement.getElementsByTagName("tileset").item(0);
// RIGHT: Here we retrieve the correct name from the freshly loaded tileset xml
name = element.getAttribute("name");
} catch (Exception e) {
Log.error(e);
throw new SlickException("Unable to load or parse sourced tileset: "+this.map.tilesLocation+"/"+source);
}
}
ciao!