--- a/net/minecraft/world/level/levelgen/structure/StructureStart.java
+++ b/net/minecraft/world/level/levelgen/structure/StructureStart.java
@@ -26,7 +_,7 @@
     private final Structure structure;
     private final PiecesContainer pieceContainer;
     private final ChunkPos chunkPos;
-    private int references;
+    private final java.util.concurrent.atomic.AtomicInteger references; // Folia - region threading
     @Nullable
     private volatile BoundingBox cachedBoundingBox;
 
@@ -39,7 +_,7 @@
     public StructureStart(Structure structure, ChunkPos chunkPos, int references, PiecesContainer pieceContainer) {
         this.structure = structure;
         this.chunkPos = chunkPos;
-        this.references = references;
+        this.references = new java.util.concurrent.atomic.AtomicInteger(references); // Folia - region threading
         this.pieceContainer = pieceContainer;
     }
 
@@ -126,7 +_,7 @@
             compoundTag.putString("id", context.registryAccess().lookupOrThrow(Registries.STRUCTURE).getKey(this.structure).toString());
             compoundTag.putInt("ChunkX", chunkPos.x);
             compoundTag.putInt("ChunkZ", chunkPos.z);
-            compoundTag.putInt("references", this.references);
+            compoundTag.putInt("references", this.references.get()); // Folia - region threading
             compoundTag.put("Children", this.pieceContainer.save(context));
             return compoundTag;
         } else {
@@ -144,15 +_,29 @@
     }
 
     public boolean canBeReferenced() {
-        return this.references < this.getMaxReferences();
-    }
+        throw new UnsupportedOperationException("Use tryReference()"); // Folia - region threading
+    }
+
+    // Folia start - region threading
+    public boolean tryReference() {
+        for (int curr = this.references.get();;) {
+            if (curr >= this.getMaxReferences()) {
+                return false;
+            }
+
+            if (curr == (curr = this.references.compareAndExchange(curr, curr + 1))) {
+                return true;
+            } // else: try again
+        }
+    }
+    // Folia end - region threading
 
     public void addReference() {
-        this.references++;
+       throw new UnsupportedOperationException("Use tryReference()"); // Folia - region threading
     }
 
     public int getReferences() {
-        return this.references;
+        return this.references.get(); // Folia - region threading
     }
 
     protected int getMaxReferences() {
