Fixed incorrect revealed blocks on some maps

This commit is contained in:
Anuken
2026-07-09 09:01:06 -04:00
parent 90464c55cf
commit b8984db2f7
15 changed files with 13 additions and 3 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+13 -3
View File
@@ -73,9 +73,19 @@ public class MapFixer{
editor.beginEdit(map);
if(!map.name().equals(targetName)){
Log.info("Changed name: '@' -> '@'", map.name(), targetName);
map.tags.put("name", targetName);
if(!state.rules.bannedBlocks.isEmpty()) Log.warn("@: Banned blocks found: @", map.name(), state.rules.bannedBlocks);
if(!state.rules.bannedUnits.isEmpty()) Log.warn("@: Banned units found: @", map.name(), state.rules.bannedUnits);
if(!map.name().equals(targetName) || state.rules.revealedBlocks.size > 0){
if(!state.rules.revealedBlocks.isEmpty()){
Log.info("@: Clearing revealed blocks: @", map.name(), state.rules.revealedBlocks);
state.rules.revealedBlocks.clear();
}
if(!map.name().equals(targetName)){
Log.info("Changed name: '@' -> '@'", map.name(), targetName);
map.tags.put("name", targetName);
}
MapIO.writeMap(f, map);
}