[suggestion/compat] Auto mob killers lag the game by spawning morphs
RedStorm1024 opened this issue ยท 2 comments
I'm playing on a server with custom modpack made by a friend which contains the beta of draconic evolution 1.16.5 and this mod
The problem is that when i use draconic's mob grinder to kill mobs it spawns a morph for every single mob killed which creates massive lags combined with draconic's stabilized spawner (more than 400 morphs at the same place)
It would be nice to disable morph spawning when the mob is killed by another mod's way to kill mobs automatically (in the case of draconic i think the mob grinder tries to look like a player in order to get player-only loots which might make it harder to disable it)
EDIT: i checked draconic evolution and forge's github and from what i can see:
- Draconic evolution uses forge's FakePlayer as a way of making minecraft drop player only items
- These FakePlayer are handled by
net.minecraftforge.common.util.FakePlayerFactory, which hasfakePlayersa static map of every FakePlayer
I think it would be possible to use that to check if the killer of an entity is a FakePlayer (which i guess is the way other mod's mob grinders work) and not spawn a morph if it is
from a modder in draconic evolution's discord:
"The mob grinder, in order to have mobs drop player-only loot, registers itself as a fake player. This fake player is the target of all kills. The morphing mod would have to detect fake players and not spawn something in if it's fake. If it's a good mod, it'll have a list of some sort in the config that you can add a UUID or a registered player name to said list as a contingency plan for modpack authors, so you might be able to use that instead."