Fix IllegalStateException when execute toMap (#1879)

This commit is contained in:
iTruth
2022-10-21 19:19:48 +08:00
committed by GitHub
parent be8fbcbc02
commit c331a7f288
4 changed files with 11 additions and 8 deletions

View File

@@ -62,7 +62,7 @@ public class SceneBlock {
// Set groups
this.groups = ScriptLoader.getSerializer().toList(SceneGroup.class, bindings.get("groups")).stream()
.collect(Collectors.toMap(x -> x.id, y -> y));
.collect(Collectors.toMap(x -> x.id, y -> y, (a, b) -> a));
this.groups.values().forEach(g -> g.block_id = this.id);
this.sceneGroupIndex = SceneIndexManager.buildIndex(3, this.groups.values(), g -> g.pos.toPoint());