McJtyMods / InControl

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

Mob spawn ignores light levels. #405

Open ZZiggsZ opened 9 months ago

ZZiggsZ commented 9 months ago

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.

ZZiggsZ commented 9 months ago

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

McJty commented 9 months ago

ALWAYS tell the version

ZZiggsZ commented 9 months ago

1.19.2

McJty commented 9 months ago

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

ZZiggsZ commented 9 months ago

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 9 months ago

Just add it to the conditions block in spawner.json

ZZiggsZ commented 9 months ago

simply "norestrictions": true and thats?

McJty commented 9 months ago

yes

ZZiggsZ commented 9 months ago

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

McJty commented 9 months ago

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

ZZiggsZ commented 9 months ago

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 9 months ago

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

ZZiggsZ commented 9 months ago

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

McJty commented 9 months ago

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

ZZiggsZ commented 9 months ago

sure can you send me a link?

McJty commented 9 months ago

https://discord.gg/KBtXVMxU