summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authorSenmori <thesenmori@gmail.com>2018-09-23 09:41:57 -0400
committermd_5 <git@md-5.net>2018-09-24 09:55:18 +1000
commitdcb43ef83dd0dc8b26e9923eaeed82b659ab5780 (patch)
tree8c9f854029983f4a4dff310e0a2b60fd49a8bb7e /nms-patches
parent7d506c6cd759646477e4d8dc8353b995d36aaa8c (diff)
downloadcraftbukkit-dcb43ef83dd0dc8b26e9923eaeed82b659ab5780.tar
craftbukkit-dcb43ef83dd0dc8b26e9923eaeed82b659ab5780.tar.gz
craftbukkit-dcb43ef83dd0dc8b26e9923eaeed82b659ab5780.tar.lz
craftbukkit-dcb43ef83dd0dc8b26e9923eaeed82b659ab5780.tar.xz
craftbukkit-dcb43ef83dd0dc8b26e9923eaeed82b659ab5780.zip
MC-136886: locate command loads chunks without needing to.
Thanks Aikar for the report
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/StructureGenerator.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/nms-patches/StructureGenerator.patch b/nms-patches/StructureGenerator.patch
new file mode 100644
index 00000000..b2cc226f
--- /dev/null
+++ b/nms-patches/StructureGenerator.patch
@@ -0,0 +1,20 @@
+--- a/net/minecraft/server/StructureGenerator.java
++++ b/net/minecraft/server/StructureGenerator.java
+@@ -43,7 +43,7 @@
+ StructureStart structurestart = this.a(generatoraccess, chunkgenerator, (SeededRandom) random, i2);
+
+ if (structurestart != StructureGenerator.a && structurestart.c().a(l, i1, l + 15, i1 + 15)) {
+- ((LongSet) chunkgenerator.getStructureCache(this).computeIfAbsent(j1, (i) -> {
++ ((LongSet) chunkgenerator.getStructureCache(this).computeIfAbsent(j1, (x) -> { // CraftBukkit - fix decompile error
+ return new LongOpenHashSet();
+ })).add(i2);
+ generatoraccess.getChunkProvider().a(j, k, true).a(this.a(), i2);
+@@ -204,7 +204,7 @@
+ return structurestart;
+ } else {
+ ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i);
+- IChunkAccess ichunkaccess = generatoraccess.getChunkProvider().a(chunkcoordintpair.x, chunkcoordintpair.z, false);
++ IChunkAccess ichunkaccess = generatoraccess.getChunkProvider().getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, false, false); // CraftBukkit - don't load chunks
+
+ if (ichunkaccess != null) {
+ structurestart = ichunkaccess.a(this.a());