Merge pull request #116 from mlus-asuka/1.20.1-dev

clear curios before restore?
This commit is contained in:
mlus 2025-09-10 16:11:02 +08:00 committed by GitHub
commit 7754186d12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -56,6 +56,7 @@ public class ModsSupport {
// Restore each saved item. // Restore each saved item.
handlerOpt.ifPresent(handler -> { handlerOpt.ifPresent(handler -> {
handler.getCurios().clear();
for (Map.Entry<String, String> entry : storedMap.entrySet()) { for (Map.Entry<String, String> entry : storedMap.entrySet()) {
String compositeKey = entry.getKey(); // Expected format: "slotType:index" String compositeKey = entry.getKey(); // Expected format: "slotType:index"
String[] parts = compositeKey.split(":"); String[] parts = compositeKey.split(":");