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]: Disabling easter-egg bees breaks most pages in guide book #351

Open CombatZAK opened 2 years ago

CombatZAK commented 2 years ago

Bug Description

If you set enableEasterEggBees to false in General Options in resourcefulbees/common.toml config file, the Resourceful Bees guidebook fails to load properly and will end up missing a significant number of pages, listed below:

Getting Started

Advanced Tips

Beekeeping Tools

Extras

Main page of the guidebook shows a loading error; see screenshot: image

How to Reproduce?

  1. Load minecraft to auto-generate config files for Resourceful Bees
  2. Create creative world
  3. Add a copy of Fifty Shades of Bees guidebook item to inventory
  4. Observe all pages loaded properly
  5. Close game, edit config/resourcefulbees/common.toml
  6. Under General Options change value of enableEasterEggBees from true to false
  7. Save config file
  8. Reload game
  9. Open guidebook
  10. Observe loading error and missing pages

Expected Behavior

Modifying config values should not break guidebook.

Version

0.10.7

Mod Loader Version

1.16.5-36.2.34

Logs or additional context

Given the specific error message, my guess is that disabling this specific config option prevents the Starry Bee's honey from being registered with minecraft, and the guidebook relies on that ID to load this page. That's causing an unhandled exception and so page-loading stops at this specific point and any subsequent pages are not loaded. Swallowing the exception or just selectively not loading the extra bees section at all would likely fix the problem.

Acknowledgement

CombatZAK commented 2 years ago

Found an acceptable workaround: registering a honey with name starry and a bee named starry.json "tricks" the mod into not failing and lets all the pages load properly. Should probably still get fixed in code, but if anyone else hits this, you can still make it work.