In Control!

In Control!

72M Downloads

Mob spawn ignores light levels.

ZZiggsZ opened this issue ยท 16 comments

commented

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.

commented

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

commented

ALWAYS tell the version

commented

1.19.2

commented

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

commented

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?

commented

Just add it to the conditions block in spawner.json

commented

simply "norestrictions": true and thats?

commented

yes

commented

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

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

commented

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?

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

commented

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

commented

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

commented

sure can you send me a link?