mojira.dev
MC-177541

/locatebiome has limited search radius

When using the /locatebiome command, biomes that are too far from the player's position will display an error message "Could not find a <biome_name> within reasonable distance."

This limitation shouldn't exist as players can just /tp to that location instantly.

Linked issues

Attachments

Comments 3

Teleporting to a given location is an "easy" and deterministic task, practically exactly one action (though it may have to generate the world around the target location). That is why tp can be allowed to any location "instantly".

But looking for specific biome is not deterministic; the program has to search for it. Since the generation is random, there is no better way to search than "exhaustive" (basically, start from a point and search outwards in a spiral or such), and with bad enough luck, it might run for a really long time... To prevent such outcomes, it has some reasonable limit in that searching distance, and thus limits the amount of CPU work to be done.

Also, that command probably doesn't know which kind of world it is being used with. Some custom world generator, or a new bug in the default world generator, resulting in world with no desired biome at all? That command would be stuck forever...

Technically, there are methods that could be continued "forever" on the background, searching further and further away, but I guess Mojang decided the current way is good enough.

I understand why, but the /locate command (for finding structures) seems to be unlimited and I don't see the reason why /locatebiome should be limited. At least add an unlimited option like:

/locatebiome nolimit minecraft:desert

to toggle unlimited search radius.

just a suggestion, syntax should probably look like this:

/locatebiome <nolimit | int> <biome_name>

"/locatebiome minecraft:desert" for default radius
"/locatebiome nolimit minecraft:desert" for unlimited radius
"/locatebiome 30000 minecraft:desert" for 30000-block radius

Joey

(Unassigned)

Confirmed

(Unassigned)

20w14a

Retrieved