Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want zombies to spawn both day and night and in caves BUT NOT in structures like houses. Is that possible? #457

Open
LordDronte opened this issue Nov 6, 2024 · 2 comments

Comments

@LordDronte
Copy link

LordDronte commented Nov 6, 2024

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

@McJty
Copy link
Collaborator

McJty commented Nov 6, 2024

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

@LordDronte
Copy link
Author

LordDronte commented Nov 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants