[SPIGOT-1820] TravelAgent function setSearchRadius does not work correctly Created: 07/Mar/16  Updated: 07/Mar/16  Resolved: 07/Mar/16

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: OtakuMegane Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: Craftbukkit, bug, portal


 Description   

Using the setSearchRadius function on a TravelAgent throws no errors and will return the expected values when checking but the actual behavior when finding a nether portal still follows the vanilla defaults. Tested this on 1.9 and on 1.8 CraftBukkit and Spigot builds and all have the same problem. 1.7 builds are fine however.

Eventually found the likely cause in the NMS PortalTravelAgent method findPortal(). At some point a few lines got left out of patching and remain hard-coded to the Minecraft default of 128 instead of passing the correct search radius:

            BlockPosition blockposition = new BlockPosition(x, y, z); // CraftBukkit

            for (int l = -128; l <= 128; ++l) {
                BlockPosition blockposition1;

                for (int i1 = -128; i1 <= 128; ++i1) {

Generated at Sat Mar 22 20:41:25 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.