mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 22:21:19 +00:00
Added #2057 Show all assigned AS linkage classes in the item name (instead just one)
This commit is contained in:
@@ -3308,16 +3308,26 @@ public class XFLConverter {
|
||||
|
||||
private static Map<Integer, String> getCharacterClasses(ReadOnlyTagList tags) {
|
||||
Map<Integer, String> ret = new HashMap<>();
|
||||
Set<Integer> multipleClassesCharacters = new HashSet<>();
|
||||
for (Tag t : tags) {
|
||||
if (t instanceof SymbolClassTag) {
|
||||
SymbolClassTag sc = (SymbolClassTag) t;
|
||||
for (int i = 0; i < sc.tags.size(); i++) {
|
||||
if (!ret.containsKey(sc.tags.get(i)) && !ret.containsValue(sc.names.get(i))) {
|
||||
ret.put(sc.tags.get(i), sc.names.get(i));
|
||||
} else if (ret.containsKey(sc.tags.get(i))){
|
||||
multipleClassesCharacters.add(sc.tags.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i: multipleClassesCharacters) {
|
||||
ret.remove(i);
|
||||
}
|
||||
|
||||
//TODO: handle multiple classes assigned to same character (Can happen when Embed tag used with identical file)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user