summaryrefslogtreecommitdiffstats
path: root/nms-patches/StructureGenerator.patch
blob: 72129e0ee71c8eeaef49b62bd938bb88f2b87005 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- a/net/minecraft/server/StructureGenerator.java
+++ b/net/minecraft/server/StructureGenerator.java
@@ -93,7 +93,7 @@
         return this.c(blockposition) != null;
     }
 
-    protected StructureStart c(BlockPosition blockposition) {
+    protected synchronized StructureStart c(BlockPosition blockposition) { // CraftBukkit - synchronized
         Iterator iterator = this.c.values().iterator();
 
         while (iterator.hasNext()) {
@@ -115,7 +115,7 @@
         return null;
     }
 
-    public boolean b(World world, BlockPosition blockposition) {
+    public synchronized boolean b(World world, BlockPosition blockposition) { // CraftBukkit - synchronized
         this.a(world);
         Iterator iterator = this.c.values().iterator();
 
@@ -132,7 +132,7 @@
         return true;
     }
 
-    public BlockPosition getNearestGeneratedFeature(World world, BlockPosition blockposition) {
+    public synchronized BlockPosition getNearestGeneratedFeature(World world, BlockPosition blockposition) { // CraftBukkit - synchronized
         this.g = world;
         this.a(world);
         this.f.setSeed(world.getSeed());
@@ -194,7 +194,7 @@
         return null;
     }
 
-    protected void a(World world) {
+    protected synchronized void a(World world) { // CraftBukkit - synchronized
         if (this.a == null) {
             this.a = (PersistentStructure) world.a(PersistentStructure.class, this.a());
             if (this.a == null) {