Does Not Prevent MultiMob (PrimitiveMobs) Spawning
nephatrine opened this issue ยท 3 comments
It does not seem like the megatorches work for PrimitiveMobs and The Summoner (both using MultiMob to control spawning). Since PrimitiveMobs seems pretty popular it might be good to add a compat for MultiMob.
Hm, i've peeked into their code and I cant see anything that would prevent torchmaster from working. I'll take a closer look but as it stands right now, it should work.
So, i'll consider this a bug for now.
After some further investigation, I found no issue in torchmaster itself. All entities are added properly to the block list and my event handler blocks everything that should be blocked.
I have one special check that explicitly allows spawns if another mod has set the CheckSpawn Event Result to ALLOW
. By default, this result is set to DEFAULT
but MultiMob has its own CheckSpawn Event Handler that sets the spawn for some entities to ALLOW
instead of DEFAULT
. This effectivly bypasses all of my spawn checks.
My philosophy is, if some mod sets the spawn result to any other value than DEFAULT
, it really wants this mob to spawn (or not to spawn) and no other mod should interfere.
I'm not sure if this is an oversight by @Daveyx0. It might be intentional - and if that is the case, I dont want to question his decision. If its not intentional, then it should be fixed in MultiMob.
<edit>
Another thing: The MultiMob CheckSpawn handler seem to run after TorchMasters CheckSpawn handler - effectivly overriding everything I set. If this allow spawn behavior is not intentional, MultiMob should also add a check if another mod has already modified the event result and dont act in that case. (Maybe with a configurable setting to override this behavior)
</edit>
I will probably add a feature to ignore the event result set by other mods but leave that option off by default as this might only lead to an annoying cat and mouse game.
I hope @Daveyx0 could give his 2 cents on this issue. It is not a bug in torchmaster though. :)
Ah yeh uhm the reason I set it to ALLOW is to bypass the canCreatureSpawnHere checks of mobs in the WorldSpawner. The reason I do this is so people can add spawns without the restrictions of the mob class itself preventing the spawns. I could definitely do at least a check if they enabled canOverrideCreatureSpawnChecks and if not just return DEFAULT. I could also do a check if the event is already set to DENY, then don't run that's also fine. Thanks for mentioning this!