diff --git a/patches/server/Rewrite-chunk-system.patch b/patches/server/Rewrite-chunk-system.patch index 258cfa9323..95e5bad95f 100644 --- a/patches/server/Rewrite-chunk-system.patch +++ b/patches/server/Rewrite-chunk-system.patch @@ -3781,7 +3781,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + @Override + public void get(final EntityTypeTest filter, final AbortableIterationConsumer action) { -+ for (final Entity entity : this.entityById.values()) { ++ final Int2ReferenceOpenHashMap entityCopy; ++ ++ this.entityByLock.readLock(); ++ try { ++ entityCopy = this.entityById.clone(); ++ } finally { ++ this.entityByLock.tryUnlockRead(); ++ } ++ for (final Entity entity : entityCopy.values()) { + final Visibility visibility = EntityLookup.getEntityStatus(entity); + if (!visibility.isAccessible()) { + continue;