McJtyMods/InControl

Mob spawn ignores light levels.

Opened this issue · 16 comments

Hey I have an issue. So I have several mobs that I used the spawner.json file for. However those mobs now ignore the light level.

Now here is where it gets tricky. I want them to be able to spawn during the day at the surface. So the lightlevel should be ignored there. HOWEVER i only want them to be able to spawn in the dark in caves. i don't want them to be able to spawn in a room lit with torches in a cave.

tell me a code i can use for the spawn.json file

McJty commented

ALWAYS tell the version

1.19.2

McJty commented

You need to use spawner.json and add a rule there using norestrictions true (and all the other needed stuff)

spawner.json
Ok this is my spawner.json file and the code I currently have. The thing is with the norestrictions thing. I don't know what I have to do with it. How would you change that code so that my issue is fixed?

McJty commented

Just add it to the conditions block in spawner.json

simply "norestrictions": true and thats?

McJty commented

yes

but then they will still spawn during the day on the surface or not?

McJty commented

You'll have to finetune what you want in spawn.json. With spawner.json you spawn them unrestricted. With spawn.json you can deny them if needed. For that you can use things like minlight (minimum light level) or seeksy (are we outside).

again i want them to ignore the light level on the surface because i want to spawn during the day as well. but i want them to not ignore the night level and only spawn in the dark when i'm inside a cave because if seek shelter in a room filled with torches i don't want to see them spawn in there. you said something about the seesky rule. how can i add this with the norestrictions rule so that it works they way i want?

McJty commented

As I said, seesky goes to spawn.json. It's just one of the many conditions you can use in spawn.json. You use it as any other condition like minlight, ...

Can you give me an example of how to set up a rule with seesky?

McJty commented

Can you please visit my discord? This is not a place to discuss this

sure can you send me a link?