YUNG-GANG / Travelers-Titles

Minecraft mod for epic, RPG-like titles when entering biomes & dimensions
GNU Lesser General Public License v3.0
19 stars 9 forks source link

Feature Request: Biome Groups #1

Closed WACriminalG2 closed 3 years ago

WACriminalG2 commented 3 years ago

It would be really handy if we could somehow define groups of biomes to share a trigger. That way, when the player is wandering around a complex biome area that has a lot of variant sub-biomes (example: a parent biome that has multiple mesa variant biomes within it, as well as a river variant), the title wouldn't trigger every time they moved between a mesa and a river, a river and the lowlands, the lowlands and a mesa, etc. But it would still trigger when they enter any section of the area from a completely different biome outside it.

This would be primarily useful for custom terrain generator mods like OTG that allow pack developers to define relationships between biomes such as borders, rivers, and islands.

yungnickyoung commented 3 years ago

I agree something needs to be done to address chaotic biome borders. I'm not sure how I'd go about implementing grouping in a way that is friendly to the user though.

Perhaps an alternative is the following:

Let me know if you think that would address the problem you're having

WACriminalG2 commented 3 years ago

It seems like the simplest way would be to compare the translation value (not key) for OldBiome and NewBiome. If they match, don't display the title.

Pro: Can easily be configured by pack devs with a simple lang file in their datapack. Con: Overrides the translation for any other tools which might reference it, such as biome detector items. Shouldn't, however, impact any recipes or events since those utilize the biome's registry ID rather than the translation.

I'm not sure the solution you mentioned would work in my use case (although I'm sure it would cover most) because with OTG, I'm utilizing a LOT of technical biomes, but I don't want the player to see them as being separate. For instance, I've got one volcano biome that actually consists of 5 layered variants, but I'll be providing them all the same name. With the suggestion you mentioned, as the player climbs the volcano, it would re-trigger the title at the base of the mountain, at the top of the slope, and in the caldera again.

yungnickyoung commented 3 years ago

Ok, so v1.2 should hopefully address this.

Biome comparison is now done via translated value, so if you give multiple biomes the same translation, the title should no longer re-render.

To avoid messing with translations other tools might used, I've made it so you can use the lang key:
travelerstitles.biome.namespace.biomename.

This applies for color as well:
travelerstitles.biome.namespace.biomename.color.

Any entries using a key that is prepended with travelerstitles will take priority over the normal biome entries.

More info can be found on the CurseForge page. If anything is unclear, let me know. Hopefully this helps to fix your problem!

WACriminalG2 commented 3 years ago

That's utterly fantastic. Thank you.

yungnickyoung commented 3 years ago

:)

If any problems arise or if you have other feature requests, feel free to open another issue!