Skip to content

Conversation

@MarcGuiselin
Copy link
Collaborator

@MarcGuiselin MarcGuiselin commented Jan 10, 2026

If a mod spawns an entity on ModStartup and then gets reloaded there will be multiple duplicate entities in the world.

This pr adds tracking for entities spawned by a mod. If the mod is unloaded (despawned) or hot-reloaded the entities from the old version will be despawned. I think this is closer to what a user expects.

This behaviour is configurable and opt out via ModloaderPlugin::set_despawn_behaviour(ModDespawnBehaviour::None).

Depends on #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants