diff options
author | syeyoung <cyong06@naver.com> | 2021-02-13 21:38:22 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-02-13 21:38:22 +0900 |
commit | 3bbe67ecd993bac9e32e7f303ce84b2fa5c7cda4 (patch) | |
tree | 8505eb72ebb6ea5b8238ab7174e56123871c6b87 /src/main/java/kr/syeyoung/dungeonsguide/dungeon | |
parent | acbdeb579e4c64d96b9274996e2a21659385fcfe (diff) | |
download | Skyblock-Dungeons-Guide-3bbe67ecd993bac9e32e7f303ce84b2fa5c7cda4.tar.gz Skyblock-Dungeons-Guide-3bbe67ecd993bac9e32e7f303ce84b2fa5c7cda4.tar.bz2 Skyblock-Dungeons-Guide-3bbe67ecd993bac9e32e7f303ce84b2fa5c7cda4.zip |
I commit
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon')
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java index 128090db..1bd708d3 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoomInfoRegistry.java @@ -24,7 +24,12 @@ public class DungeonRoomInfoRegistry { public static void register(DungeonRoomInfo dungeonRoomInfo) { if (dungeonRoomInfo == null) throw new NullPointerException("what the fak parameter is noll?"); - if (uuidMap.containsKey(dungeonRoomInfo.getUuid())) return; + if (uuidMap.containsKey(dungeonRoomInfo.getUuid())) { + DungeonRoomInfo dri1 = uuidMap.get(dungeonRoomInfo.getUuid()); + registered.remove(dri1); + shapeMap.get(dri1.getShape()).remove(dri1); + uuidMap.remove(dri1.getUuid()); + } dungeonRoomInfo.setRegistered(true); registered.add(dungeonRoomInfo); uuidMap.put(dungeonRoomInfo.getUuid(), dungeonRoomInfo); @@ -58,6 +63,7 @@ public class DungeonRoomInfoRegistry { boolean isDev = Minecraft.getMinecraft().getSession().getPlayerID().replace("-","").equals("e686fe0aab804a71ac7011dc8c2b534c"); System.out.println(isDev); String nameidstring = "name,uuid,processsor,secrets"; + String ids = ""; for (DungeonRoomInfo dungeonRoomInfo : registered) { try { if (!dungeonRoomInfo.isUserMade() && !isDev) continue; @@ -68,11 +74,13 @@ public class DungeonRoomInfoRegistry { oos.close(); nameidstring += "\n"+dungeonRoomInfo.getName()+","+dungeonRoomInfo.getUuid() +","+dungeonRoomInfo.getProcessorId()+","+dungeonRoomInfo.getTotalSecrets(); + ids += "roomdata/"+dungeonRoomInfo.getUuid() +".roomdata\n"; } catch (Exception e) {e.printStackTrace();} } try { Files.write(nameidstring, new File(dir, "roomidmapping.csv"), Charset.defaultCharset()); + Files.write(ids, new File(dir, "datas.txt"), Charset.defaultCharset()); } catch (IOException e) { e.printStackTrace(); } |