AtomicStryker's Infernal Mobs

AtomicStryker's Infernal Mobs

34M Downloads

Disable "infernal" feature for some mobs by another mod.

NightKosh opened this issue ยท 5 comments

commented

Hello. I'm looking for a compatibility feature. I need a way to prevent some of my mobs(from my mod) to become infernal directly from my mod. Is it possible?
I'm asked about this because there are few specific mobs in my mod which can spawn at another hostile mobs death and at some blocks destruction(like a silverfish, but in a huge amount). I think it is not fair for players and would like to disable "infernal" features for them.

commented

Hi, any mob class that is encountered by Infernal Mobs for the first time is auto-entered into the config file and "whitelisted". All you have to do is edit the file and disable your mod entities. You can also distribute a premade config file with your mod entities blacklisted like that.

commented

Yes, I know about it. But I'd like to be able to do it directly through my mod, so all other users should not even think about it. It is not possible to do at the moment, isn't it?

commented

Well, if you are a modder yourself, sure it is possible. See https://github.com/AtomicStryker/atomicstrykers-minecraft-mods/blob/1.12.2/InfernalMobs/src/main/java/atomicstryker/infernalmobs/common/InfernalMobsCore.java#L99 for where Infernal Mobs keeps the configuration buffered as HashMap<String, Boolean>. You can use reflection to edit this map as you please ingame, yes even from your mod.

commented

Ok. It should be enough for me. Thank you a lot!

P.S. it would be great if you add an API for it in the feature(for sure if you'll have time and desire). Or at least some another way. Reflection is a some kind of "dirty hack" for compatibility tasks.

commented

It'll be part of the minecraft API. ;)