Open Terrain Generator (OTG)

Open Terrain Generator (OTG)

10M Downloads

Iterating through biome names to hook into custom plugin

stifflered opened this issue ยท 1 comments

commented

Hello,

I have released a plugin that triggers an action when a player enters a new vanilla biome, and lists those biomes in a GUI for easy management of those actions.

One of my users uses your plugin, and so I'd like to add in support for OTG.

Is there a way for me to easily gain a list of all enabled biomes and their associated IDs so that I can list them in my plugin's GUI and then listen as players move from one biome to another?

You can see my plugin here, for reference: https://www.spigotmc.org/resources/musicalbiomes-pro-for-mcjukebox-50-off-sale.53350/

commented

Hey @stifflered, thanks for the feedback and sorry for the late response. Unfortunately, I don't know of any event for when players discover a new biome, OTG doesn't implement one either. To fetch the biomes: Unlike other plugins/mods, OTG registers biomes at world creation, not at app start, so if you query the biome registry after world creation / load you should be able to find them.