McJtyMods / InControl

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

Daytime zombies issue #325

Closed taz4270 closed 1 year ago

taz4270 commented 2 years ago

Hi, Im trying to make zombies to spawn during the day for i'm having trouble to make it work, i've tried to make this script

[ { "mob": "minecraft:zombie", "result": "allow", "seesky" : true, "mincount" : 4, "maxcount" : 12, "minlight" : 0, "maxlight" : 15, "mintime" : 0, "maxtime" : 23999, "random" : 0.2 }, { "passive": true, "result": "default" }, { "result": "deny" } ]

Can someone help plz?

McJty commented 2 years ago

Your mincount/maxcount thing is messing this up. If there are more then 12 zombies already in the game then this will not succeed because maxcount will be exceeded. And it's very likely that underground there are more then 12 zombies

taz4270 commented 2 years ago

That would be true but I'm testing on a flat world and they still do not spawn even if I kill all entities to reroll the spawns

McJty commented 2 years ago

Well that's because of mincount. Your rule only fires if there are minimum 4 zombies. So if there are no zombies you will never have zombies

taz4270 commented 2 years ago

So the minCount is the requiredMinCount to spawn since spawn.json is only a restriction rule setter. I will try to remove the minCount although I still have doubt, but I can only test this once I get home and thank you for your help!

McJty commented 2 years ago

All the statements in a rule say when the rule should fire. So if you say "mincount": 4 that means that for this rule to do something there need to be minimum 4 zombies. If they are no zombies then that rule will not work

taz4270 commented 2 years ago

I've edited my spawn.json but still couldn't make it work. The only thing I want to make is to spawn zombies during the day but with this script i can't [ { "result": "deny" }, { "passive": true, "result": "default" }, { "mob": "minecraft:zombie", "result": "allow", "seesky" : true, "minlight" : 0, "maxlight" : 15, "mintime" : 0, "maxtime" : 23999, "random" : 0.2 } ]

I've removed the minCount so the rule should fire and even if I have minCount to 0 will have the same result.

Using:

McJty commented 2 years ago

Your first rule is deny. That will deny everything and the rules after that will never even get tried. Rules are fired in order from first to last. You first spawn.json was more correct. The rules were in the correct order there

taz4270 commented 2 years ago

I've tried to do it like how the JsonParser reads it (normally). Also inverting the rules upside down didn't make any changes for zombies 😕

McJty commented 2 years ago

Show your latest (inverted) rules

taz4270 commented 2 years ago

It's basically the first one but without "mincount" and "maxcount" [ { "mob": "minecraft:zombie", "result": "allow", "seesky": true, "minlight": 0, "maxlight": 15, "mintime": 0, "maxtime": 23999, "random": 0.2 }, { "passive": true, "result": "default" }, { "result": "deny" } ]

To me, it makes sense from what I've read from the wiki. I might be missing something to make it work, idk its my guess

McJty commented 2 years ago

Ok, and what happens exactly with this? You do restart Minecraft and kill all mobs first?

taz4270 commented 2 years ago

I restart or use the command '/incontrol reload' (it will do the same result) and kill them using the '/kill @e[type=!#minecraft:player]' command to eliminate every entity but they just dont spawn. Could it be because of the 1.18 Natural Spawn changes?