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

Merge pull request #392 from jhqwqmc/dev

fix(core): 修复1.20启动报错
This commit is contained in:
XiaoMoMi
2025-09-30 14:58:30 +08:00
committed by GitHub
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);
}