chikage_reported this bug
Description
The global MythicMobs scheduler can become permanently stuck when a mob executes a block-related skill while its world is being unloaded.
Steps to reproduce
- Spawn a mob with a skill using
BlocksInRadiusTargeter(e.g. a skill that searches for nearby blocks). - Let the skill execute while the mob is inside a world.
- Unload the world while the skill is accessing nearby blocks (for example, when an empty dungeon instance is automatically closed).
- The MythicMobs scheduler becomes permanently blocked.
Observed behavior
The MythicMobs scheduler gets stuck while attempting to access blocks in a chunk belonging to a world that is being unloaded or has already been unloaded. Since the scheduler is shared across the server, this affects all MythicMobs scheduled tasks, including:
- Skills executed at intervals.
- Delayed skills and other scheduled mechanics.
- Any gameplay mechanics relying on MythicMobs' scheduler.
The issue persists until the server is restarted.
Possible fix
Add a validation before accessing blocks in BlocksInRadiusTargeter to ensure that:
- The world is still loaded.
- The target chunk is loaded.
- Block access is skipped if the chunk is unavailable.
More generally, block-related targeters should safely handle world unloading to prevent the global scheduler from becoming permanently stuck.
Thank you Chikage