McJtyMods / InControl

Be In Control of Mob Spawns and others
MIT License
46 stars 17 forks source link

Spawn.json is not working when used like this #417

Closed Kettle5000 closed 6 months ago

Kettle5000 commented 6 months ago

I tried to make mobs from those mods to only spawn in the lost cities dimension. I tried first to allow in lostcities:lostcity and deny but it caused all mobs to not spawn at all which is weird then i tried to do this and it didnt work at all, mobs from the first mod were able to spawn without any problem. PD: im fully aware of how forge manages events spawning, so i tried to make a mod to fully remove them from spawning using the MobSpawnEvent.SpawnPlacementCheck and i was succeded in removing from spawning, not sure if this could clarify that the mobs from the flesh that hates follow normal spawning methods. spawn.json I must also clarify that it works when the variable "when" is set to onjoin (probably because you get the entity itself directly), but other methods like "position" do not work at all

McJty commented 6 months ago

Yes some mods don't correctly fire all events. That's why you sometimes need to use onjoin. But that's not a bug in InControl. I don't understand the purpose of this ticket?

Kettle5000 commented 6 months ago

I already tried to check myself if the event is fired and it is, so is not a problem with the mod im trying to change. The code i tried was able to remove detect it but this mod doesnt seem to detect it

Here is what i was able to achieve:

image

so the method above works and removes the entity from spawning what i dont get is why yours do not and it only happens when i try it the way i sended it in the json. pd: yeah i didnt know how to check if the event is happening in a dimension so i managed to make it work with strings but works. PD2: yeh i realized the code has a little problem but that is not the issue rn, still i would lovely appreciate if you show me how should i properly check for dimensions This is for 1.20.1

Kettle5000 commented 6 months ago

my bad the mob spawns anyway just the sound glitches.