From 39b0da2b99e4ec4c8e342ab0c748f0b102108bf2 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 1 Jan 2021 17:19:14 +0000 Subject: [PATCH] we do want to synchronise across the chunk when loading sections --- .../boydti/fawe/beta/implementation/blocks/CharBlocks.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/blocks/CharBlocks.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/blocks/CharBlocks.java index d17613e18..cce611d28 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/blocks/CharBlocks.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/blocks/CharBlocks.java @@ -54,14 +54,13 @@ public abstract class CharBlocks implements IBlocks { }; public final char[][] blocks; public final Section[] sections; - private final Object[] loadLock = new Object[16]; + private final Object loadLock = new Object(); public CharBlocks() { blocks = new char[16][]; sections = new Section[16]; for (int i = 0; i < 16; i++) { sections[i] = EMPTY; - loadLock[i] = new Object(); } } @@ -122,7 +121,7 @@ public abstract class CharBlocks implements IBlocks { if (section.isFull()) { return section.get(this, layer); } - synchronized (loadLock[layer]) { + synchronized (loadLock) { return sections[layer].get(this, layer); } }