Spigot does not support parallel stream processing for placing blocks and entities in the world.

This is a hot-fix release.
This commit is contained in:
BONNe 2022-10-11 09:37:59 +03:00
parent 1a59ca7785
commit 065f4ba4bd
2 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>1.21.0</build.version>
<build.version>1.21.1</build.version>
<sonar.organization>bentobox-world</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>

View File

@ -16,7 +16,7 @@ import java.util.stream.Collectors;
public class PasteHandlerImpl implements PasteHandler {
@Override
public CompletableFuture<Void> pasteBlocks(Island island, World world, Map<Location, BlueprintBlock> blockMap) {
return blockMap.entrySet().parallelStream()
return blockMap.entrySet().stream()
.map(entry -> DefaultPasteUtil.setBlock(island, entry.getKey(), entry.getValue()))
.collect(
Collectors.collectingAndThen(
@ -28,7 +28,7 @@ public class PasteHandlerImpl implements PasteHandler {
@Override
public CompletableFuture<Void> pasteEntities(Island island, World world, Map<Location, List<BlueprintEntity>> entityMap) {
return entityMap.entrySet().parallelStream()
return entityMap.entrySet().stream()
.map(entry -> DefaultPasteUtil.setEntity(island, entry.getKey(), entry.getValue()))
.collect(
Collectors.collectingAndThen(