Team-Resourceful / ResourcefulBees

Minecraft Mod for creating highly customized bees
https://www.resourcefulbees.com
GNU Lesser General Public License v3.0
75 stars 31 forks source link

[Bug]: Biome dictionary tags are PARTIALLY case-sensitive #350

Open CombatZAK opened 2 years ago

CombatZAK commented 2 years ago

Bug Description

It seems that using biome dictionary tags are case-insensitive when building a list of biomes where a bee might spawn to display in JEI or the beepedia, but case-sensitive when determining where bees can actually spawn.

For example, if using a tag like this for a custom bee:

"biomeWhitelist": "tag:forest",

then bees will spawn as expected in both vanilla Minecraft biomes, as well as biomes added by additional mods which use the dictionary forest tag.

However, a tag formatted like this:

"biomeWhitelist": "TAG:FOREST",

Then, while the list of biomes is correct in JEI, bees will only spawn in vanilla biomes, and they will never spawn in custom biomes which use the dictionary tag. Biomes O' Plenty was used to verify this behavior - I am uncertain if it is a specific bad interaction with this mod or a general case problem.

How to Reproduce?

  1. Create a custom be that uses biome dictionary tags for biomeWhitelist

  2. Set the dictionary tags to TAG:FOREST (all caps)

  3. Set the spawnWeight value to an arbitrarily high value (ex, 1000)

  4. Add custom biomes to the forest.json biome dictionary from another mod (e.g, biomes o' plenty)

  5. Load minecraft and observe valid bee biomes in JEI

  6. Search custom biome(s) for custom bee

  7. Find none

  8. Change biomeWhitelist value to tag:forest

  9. Create new world

  10. Search custom biomes for custom bee

  11. Find bee

Expected Behavior

Case sensitivity rules should be consistent between valid biomes displayed in JEI/beepedia and actual spawn rules.

Version

0.10.7

Mod Loader Version

Forge 1.16.5 - 36.2.34

Logs or additional context

This behavior was found by observation only, and without attaching a debugger or looking at code. I can do a deep analysis on the 1.16.5 branch to confirm if you would find it helpful.

Acknowledgement