I want zombies to spawn both day and night and in caves BUT NOT in structures like houses. Is that possible?
LordDronte opened this issue · 2 comments
I did this for the spawn.json
[
{
"result": "deny",
"mob": "minecraft:zombie",
"hasstructure": true
},
{
"result": "allow",
"mob": "minecraft:zombie",
"seesky": false
}
]
and this to the spawner.json
[
{
"mob": "minecraft:zombie",
"persecond": 1,
"attempts": 3,
"amount": {
"minimum": 2,
"maximum": 14
},
"conditions": {
"dimension": "minecraft:overworld",
"norestrictions": true,
"mindist": 15,
"maxdist": 70,
"minheight": 1,
"maxheight": 256,
"maxthis": 150
}
}
]
Thx to this, day and night is working well, but not the structure command
Sigh, why does everyone keeping this mistake. A rule that has result allow at the end of spawn.json doesn't do anything because mobs are already allowed to spawn by default. This is explained in the wiki. You need a third rule in spawn.json after the others to simply deny zombies with no other conditions.
Also using 'norestrictions': true prevents spawn.json. So remove that from spawner.json
Sorry to bother you, but I can assure you that, as a French speaker, understanding lines of code in English isn’t very simple. So I tried to follow what you said by adding a third command in spawn.json:
[
{
"result": "deny",
"mob": "minecraft:zombie",
"hasstructure": true
},
{
"result": "allow",
"mob": "minecraft:zombie",
"seesky": false
},
{
"result": "allow",
"mob": "minecraft:zombie",
"seesky": true
}
]
and removing norestrictions in spawner.json. I validated it in Incontrol validator 1.19.2, but now zombies no longer spawn during the day because norestrictions was removed. I'm so lost.. i've been trying to understand this for weeks :') Thanks anyway