fix server block id loading
This commit is contained in:
parent
1b041cbf56
commit
8c44c024ab
1 changed files with 10 additions and 5 deletions
|
@ -74,6 +74,11 @@ public class Region {
|
|||
}
|
||||
|
||||
private static boolean makeMap(TagObject tag) {
|
||||
Set<String> removed = Sets.newHashSet();
|
||||
for(String id : tag.keySet()) {
|
||||
if(tag.hasChar(id))
|
||||
removed.add(id);
|
||||
}
|
||||
Map<String, Character> mapping = Maps.newHashMap();
|
||||
Map<String, List<Character>> current = Maps.newHashMap();
|
||||
Set<Character> taken = Sets.newHashSet();
|
||||
|
@ -102,7 +107,7 @@ public class Region {
|
|||
}
|
||||
mapping.put(id, bid);
|
||||
taken.add(bid);
|
||||
tag.remove(id);
|
||||
removed.remove(id);
|
||||
Log.IO.debug("Bestehende Block-ID %d = %s", (int)bid, id);
|
||||
}
|
||||
else {
|
||||
|
@ -129,11 +134,11 @@ public class Region {
|
|||
ENCODE_MAP[id] = bid;
|
||||
}
|
||||
}
|
||||
for(String id : tag.keySet()) {
|
||||
if(tag.hasChar(id))
|
||||
Log.IO.debug("Entfernte Block-ID %d = %s", (int)tag.getChar(id), id);
|
||||
for(String id : removed) {
|
||||
tag.remove(id);
|
||||
Log.IO.debug("Entfernte Block-ID %d = %s", (int)tag.getChar(id), id);
|
||||
}
|
||||
return !missing.isEmpty() || !tag.isEmpty();
|
||||
return !missing.isEmpty() || !removed.isEmpty();
|
||||
}
|
||||
|
||||
public static void loadMap() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue