--- a/net/minecraft/world/entity/ai/behavior/ShufflingList.java
+++ b/net/minecraft/world/entity/ai/behavior/ShufflingList.java
@@ -14,14 +14,27 @@
 import net.minecraft.util.RandomSource;
 
 public class ShufflingList<U> implements Iterable<U> {
-    protected final List<ShufflingList.WeightedEntry<U>> entries;
+    public final List<ShufflingList.WeightedEntry<U>> entries; // Paper - public
     private final RandomSource random = RandomSource.create();
+    private final boolean isUnsafe; // Paper
 
     public ShufflingList() {
+        // Paper start
+        this(true);
+    }
+    public ShufflingList(boolean isUnsafe) {
+        this.isUnsafe = isUnsafe;
+        // Paper end
         this.entries = Lists.newArrayList();
     }
 
     private ShufflingList(List<ShufflingList.WeightedEntry<U>> list) {
+        // Paper start
+        this(list, true);
+    }
+    private ShufflingList(List<ShufflingList.WeightedEntry<U>> list, boolean isUnsafe) {
+        this.isUnsafe = isUnsafe;
+        // Paper end
         this.entries = Lists.newArrayList(list);
     }
 
@@ -37,11 +50,12 @@
     }
 
     public ShufflingList<U> shuffle() {
-        this.entries.forEach((entry) -> {
-            entry.setRandom(this.random.nextFloat());
-        });
-        this.entries.sort(Comparator.comparingDouble(ShufflingList.WeightedEntry::getRandWeight));
-        return this;
+        // Paper start - make concurrent safe, work off a clone of the list
+        List<ShufflingList.WeightedEntry<U>> list = this.isUnsafe ? Lists.newArrayList(this.entries) : this.entries;
+        list.forEach(entry -> entry.setRandom(this.random.nextFloat()));
+        list.sort(Comparator.comparingDouble(ShufflingList.WeightedEntry::getRandWeight));
+        return this.isUnsafe ? new ShufflingList<>(list, this.isUnsafe) : this;
+        // Paper end
     }
 
     public Stream<U> stream() {
