Skip to content

Commit 27be2d0

Browse files
committed
fix: add store store fence to get trim too
1 parent 1fddb83 commit 27be2d0

File tree

1 file changed

+3
-0
lines changed
  • worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks

1 file changed

+3
-0
lines changed

worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/blocks/CharGetBlocks.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.sk89q.worldedit.world.block.BlockState;
88
import com.sk89q.worldedit.world.block.BlockTypesCache;
99

10+
import java.lang.invoke.VarHandle;
1011
import java.util.Arrays;
1112

1213
public abstract class CharGetBlocks extends CharBlocks implements IChunkGet {
@@ -28,6 +29,7 @@ public BaseBlock getFullBlock(int x, int y, int z) {
2829
public synchronized boolean trim(boolean aggressive) {
2930
for (int i = 0; i < sectionCount; i++) {
3031
sections[i] = EMPTY;
32+
VarHandle.storeStoreFence();
3133
blocks[i] = null;
3234
}
3335
return true;
@@ -51,6 +53,7 @@ protected char defaultOrdinal() {
5153
public synchronized boolean trim(boolean aggressive, int layer) {
5254
layer -= minSectionPosition;
5355
sections[layer] = EMPTY;
56+
VarHandle.storeStoreFence();
5457
blocks[layer] = null;
5558
return true;
5659
}

0 commit comments

Comments
 (0)