9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-19 15:09:15 +00:00

fix(core): 修复1.20启动报错

This commit is contained in:
jhqwqmc
2025-09-30 11:24:13 +08:00
parent 0bacaf45cd
commit aa5e58fb26
2 changed files with 2 additions and 2 deletions

View File

@@ -235,7 +235,7 @@ public class IdAllocator {
sortedJsonObject.addProperty(entry.getValue(), entry.getKey());
}
if (sortedJsonObject.isEmpty()) {
if (sortedJsonObject.asMap().isEmpty()) {
if (Files.exists(this.cacheFilePath)) {
Files.delete(this.cacheFilePath);
}

View File

@@ -168,7 +168,7 @@ public class VisualBlockStateAllocator {
for (Map.Entry<BlockStateWrapper, String> entry : sortedById.entrySet()) {
sortedJsonObject.addProperty(entry.getValue(), entry.getKey().getAsString());
}
if (sortedJsonObject.isEmpty()) {
if (sortedJsonObject.asMap().isEmpty()) {
if (Files.exists(this.cacheFilePath)) {
Files.delete(this.cacheFilePath);
}