Budschie's Morph Mod

Budschie's Morph Mod

939k Downloads

[suggestion/compat] Auto mob killers lag the game by spawning morphs

RedStorm1024 opened this issue ยท 2 comments

commented

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 has fakePlayers a 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

commented

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."

commented

Ok this should be fixed in the new release.