probably fixes #234
This commit is contained in:
parent
4dc56188a0
commit
facd8bd4d8
2 changed files with 2 additions and 1 deletions
|
@ -49,6 +49,7 @@ public abstract class LazyPocketGenerator extends PocketGenerator {
|
|||
if (nbt.contains("lazy_modifiers")) {
|
||||
NbtList modifiersNbt = nbt.getList("lazy_modifiers", 10);
|
||||
for (int i = 0; i < modifiersNbt.size(); i++) {
|
||||
// TODO: skip deserialization of single Modifiers on Exception.
|
||||
lazyModifierList.add((LazyModifier) Modifier.deserialize(modifiersNbt.getCompound(i)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public class PocketDirectory {
|
|||
|
||||
NbtCompound pocketsNbt = new NbtCompound();
|
||||
this.pockets.entrySet().parallelStream().unordered().map(entry -> CompletableFuture.supplyAsync(() -> new Pair<>(entry.getKey().toString(), entry.getValue().toNbt(new NbtCompound()))))
|
||||
.map(CompletableFuture::join).forEach(pair -> pocketsNbt.put(pair.getLeft(), pair.getRight()));
|
||||
.map(CompletableFuture::join).sequential().forEach(pair -> pocketsNbt.put(pair.getLeft(), pair.getRight()));
|
||||
nbt.put("pockets", pocketsNbt);
|
||||
|
||||
return nbt;
|
||||
|
|
Loading…
Reference in a new issue