From d9a999639c82a50ea5e25bb401af390f5a3a2a6d Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 21 Dec 2016 21:28:01 -0500 Subject: [PATCH] continue instead of break for treasure map bounding per: https://github.com/PaperMC/Paper/commit/01cf3186bd008cf2768ac2d05c3cc55f93786e02#commitcomment-20268968 The break may of been skipping attempts at valid chunks. I thought break was the right abort, but maybe it is not. --- .../0186-Bound-Treasure-Maps-to-World-Border.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Spigot-Server-Patches/0186-Bound-Treasure-Maps-to-World-Border.patch b/Spigot-Server-Patches/0186-Bound-Treasure-Maps-to-World-Border.patch index 33e3b817b..9b38e2fd9 100644 --- a/Spigot-Server-Patches/0186-Bound-Treasure-Maps-to-World-Border.patch +++ b/Spigot-Server-Patches/0186-Bound-Treasure-Maps-to-World-Border.patch @@ -1,4 +1,4 @@ -From 3973a234a54d46a8c925e2fc4fdafab7e205d5b5 Mon Sep 17 00:00:00 2001 +From b297ec93d59cdac144a9611ec515bf72c2f3333c Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 20 Dec 2016 15:15:11 -0500 Subject: [PATCH] Bound Treasure Maps to World Border @@ -11,7 +11,7 @@ that is outside happens to be closer, but unreachable, yet another reachable one is in border that would of been missed. diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java -index 9c1605b..b566d5e 100644 +index 9c1605b14..77236760f 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java +++ b/src/main/java/net/minecraft/server/StructureGenerator.java @@ -233,6 +233,9 @@ public abstract class StructureGenerator extends WorldGenBase { @@ -19,13 +19,13 @@ index 9c1605b..b566d5e 100644 WorldGenBase.a(world.getSeed(), random, l2, i3); random.nextInt(); + -+ if (!world.getWorldBorder().isChunkInBounds(l2, i3)) { break; } // Paper ++ if (!world.getWorldBorder().isChunkInBounds(l2, i3)) { continue; } // Paper + if (structuregenerator.a(l2, i3)) { if (!flag1 || !world.b(l2, i3)) { return new BlockPosition((l2 << 4) + 8, 64, (i3 << 4) + 8); diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java -index 632eb1c..1bb172b 100644 +index 632eb1c9d..1bb172bbf 100644 --- a/src/main/java/net/minecraft/server/WorldBorder.java +++ b/src/main/java/net/minecraft/server/WorldBorder.java @@ -33,6 +33,18 @@ public class WorldBorder { @@ -48,5 +48,5 @@ index 632eb1c..1bb172b 100644 return (double) chunkcoordintpair.e() > this.b() && (double) chunkcoordintpair.c() < this.d() && (double) chunkcoordintpair.f() > this.c() && (double) chunkcoordintpair.d() < this.e(); } -- -2.9.3 +2.11.0