From 663aa772f07c613ff332793008b9d3a53e388e98 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 24 Sep 2018 19:19:21 +1000 Subject: [PATCH] Update documentation of structure locate API to reflect implementation behaviour By: Senmori --- paper-api/src/main/java/org/bukkit/World.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/World.java b/paper-api/src/main/java/org/bukkit/World.java index 9efe698956..c8318d30ac 100644 --- a/paper-api/src/main/java/org/bukkit/World.java +++ b/paper-api/src/main/java/org/bukkit/World.java @@ -1527,10 +1527,21 @@ public interface World extends PluginMessageRecipient, Metadatable { * Finding unexplored structures can, and will, block if the world is * looking in chunks that gave not generated yet. This can lead to the world * temporarily freezing while locating an unexplored structure. + *

+ * The {@code radius} is not a rigid square radius. Each structure may alter + * how many chunks to check for each iteration. Do not assume that only a + * radius x radius chunk area will be checked. For example, + * {@link StructureType#WOODLAND_MANSION} can potentially check up to 20,000 + * blocks away (or more) regardless of the radius used. + *

+ * This will not load or generate chunks. This can also lead to + * instances where the server can hang if you are only looking for + * unexplored structures. This is because it will keep looking further and + * further out in order to find the structure. * * @param origin where to start looking for a structure * @param structureType the type of structure to find - * @param radius the radius, in chunks, around with to search + * @param radius the radius, in chunks, around which to search * @param findUnexplored true to only find unexplored structures * @return the closest {@link Location}, or null if no structure of the * specified type exists.