Terra (Fabric/Forge/Paper)

Terra (Fabric/Forge/Paper)

74.2k Downloads

[Feature] Method to locate nearest biome

Browsit opened this issue ยท 0 comments

commented
  • I have checked that I am on the latest version of Terra.
  • I have searched github for similar features requests, including closed
    ones, and found none.
  • I believe this is within the scope of Terra.
  • This feature request is for all of Terra, and isn't something that
    should be implemented by a pack or addon.

Feature Description

An API method to locate the nearest Terra biome.

What Problem Does This Solve?

Currently, it is possible to locate Terra biomes in-game via a command with the syntax of /locate biome terra:packname/packname/biomename but there is no API equivalent of this. The closest is Bukkit's World#locateNearestBiome which, of course, does not accept a com.dfsek.terra.api.world.biome.Biome (and doesn't seem to work with org.bukkit.block.Biome on Terra worlds either, even if acquired through a BiomeProvider).

A Solution You'd Like

A method of similar functionality to locateNearestBiome but which accepts com.dfsek.terra.api.world.biome.Biome instead.

Alternative Solutions (that don't work)

  1. Bukkit's method but with a Biome acquired through ChunkGenerator -> BiomeProvider (simply using World#getBiome would return Biome.CUSTOM). Tested on Paper 1.20.4.

Additonal Context

We're looking to perform actions programmatically based on the result; the /locate command is insufficient.