diff options
author | md_5 <git@md-5.net> | 2016-05-07 16:33:01 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-05-07 16:33:01 +1000 |
commit | 4cb32587ac1ff543b2efa9498f8d0d358cb90c12 (patch) | |
tree | 5deed54308babd60b1d085b957664ac04c0fcc26 /nms-patches/StructureGenerator.patch | |
parent | ed60c01794282696e4cf1ae0d7c51cb49306bd55 (diff) | |
download | craftbukkit-4cb32587ac1ff543b2efa9498f8d0d358cb90c12.tar craftbukkit-4cb32587ac1ff543b2efa9498f8d0d358cb90c12.tar.gz craftbukkit-4cb32587ac1ff543b2efa9498f8d0d358cb90c12.tar.lz craftbukkit-4cb32587ac1ff543b2efa9498f8d0d358cb90c12.tar.xz craftbukkit-4cb32587ac1ff543b2efa9498f8d0d358cb90c12.zip |
SPIGOT-2255: Nether Structure generation ConcurrentModificationException
Diffstat (limited to 'nms-patches/StructureGenerator.patch')
-rw-r--r-- | nms-patches/StructureGenerator.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/nms-patches/StructureGenerator.patch b/nms-patches/StructureGenerator.patch new file mode 100644 index 00000000..36a0ca71 --- /dev/null +++ b/nms-patches/StructureGenerator.patch @@ -0,0 +1,38 @@ +--- a/net/minecraft/server/StructureGenerator.java ++++ b/net/minecraft/server/StructureGenerator.java +@@ -94,7 +94,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()) { +@@ -116,7 +116,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(); + +@@ -133,7 +133,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()); +@@ -195,7 +195,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) { |