FoxGuard-Sponge icon indicating copy to clipboard operation
FoxGuard-Sponge copied to clipboard

Insane high cpu usage when blocking mob spawning

Open Tencao opened this issue 9 years ago • 6 comments

It seems that rather than disabling it attempting to spawn mobs, it instead just keeps blocking every single attempt, which when covering a large area, causes massive lag and cpu usage.

Tencao avatar Jan 01 '17 04:01 Tencao

There's really not a good way to block mob spawning, as minecraft and mods will just haphazardly try to spawn them if they feel like it.

If you think there's a much better method, please let me know.

gravityfox avatar Jan 01 '17 05:01 gravityfox

This sort of thing usually needs forge-level tinkering to accomplish. CustomMobSpawner and JustAnotherSpawner handle mob spawning (and denial thereof), but don't involve regions or permissions. This seems to be uncharted territory for Sponge. WorldGuard (for Bukkit) has the customisable flag block-creature-spawn: under mobs.

Inscrutable avatar Jan 01 '17 07:01 Inscrutable

I'll keep this open, but i don't think there's a good solution any time soon.

gravityfox avatar Jan 01 '17 07:01 gravityfox

Where's the code for denying mob spawns, so I can also help find a solution?

Tencao avatar Jan 01 '17 11:01 Tencao

https://github.com/FoxDenStudio/FoxGuard/blob/api5/src/main/java/net/foxdenstudio/sponge/foxguard/plugin/listener/SpawnEntityListener.java

gravityfox avatar Jan 02 '17 17:01 gravityfox

Hello!

Please be aware that many of the open issues may be closed soon, in preparation of the beta release of FoxGuard 2.0. We have not yet determined if we are going to create a new repo, or use the current one, however, if we use the current one, this issue will be closed.

If the issue occurs again at a later date in FoxGuard 2.0, please make a new issue and reference this one.

Thank you! Joshua

d4rkfly3r avatar Oct 25 '18 08:10 d4rkfly3r