McJtyMods / InControl

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

Mobs Spawning seems to ignore light level #144

Open Insane96 opened 5 years ago

Insane96 commented 5 years ago

I have this in the potentialspawn.json

{
        "block": "minecraft:nether_brick",
        "mobs": [
            {
                "mob": "minecraft:blaze",
                "weight": 1,
                "groupcountmin": 1,
                "groupcountmax": 1
            }
        ]
    }

And this in the spawn.json

{
        "mob": ["minecraft:blaze"],
        "maxlight": 7,
        "maxcount": {
            "amount": 1,
            "perchunk": true
        },
        "result": "allow"
    }

Even with amount set to 1 tons of blazes spawn. 2019-07-29_10 34 35

This doesn't happen with Thermal's Blizz even if amount is set to an higher value potentialspawn.json

{
        "block": "minecraft:snow",
        "mobs": [
            {
                "mob": "thermalfoundation:blizz",
                "weight": 1,
                "groupcountmin": 1,
                "groupcountmax": 1
            }
        ]
    }

spawn.json

{
        "mob": ["thermalfoundation:blizz"],
        "maxlight": 7,
        "result": "allow",
        "maxcount": {
            "amount": 8,
            "perchunk": true
        }
    }

2019-07-29_10 38 28

Full potentialspawn.json and spawn.json: https://gist.github.com/Insane96/d036d0c12427473ddb9d64c94a5f58af

McJty commented 5 years ago

"allow" is the standard. You need to 'deny' spawns if there are too many of a mob. If you don't have any rules with 'deny' in then spawns will always work

Insane96 commented 5 years ago

How can I do it? E.g. if I want to make blaze rarity like skeletons? Something like:

{
        "mob": ["minecraft:blaze"],
        "mincount": {
            "amount": 1,
            "perchunk": true
        },
        "result": "deny"
    }

?

McJty commented 5 years ago

perhaps. Try it out :-)

Insane96 commented 5 years ago

But why it doesn't happen for Thermal's Elementals?

McJty commented 5 years ago

No idea. Perhaps blizzes have their own built-in restrictions?

Insane96 commented 5 years ago

Uhm probably. Btw with mincount and deny now it works good. Thanks

Insane96 commented 5 years ago

Ehm almost working. Blazes ignore light level, they spawn even when the area is lit

{
    "mob": ["minecraft:blaze"],
    "maxlight": 7,
    "maxcount": {
        "amount": 8,
        "perchunk": true
    },
    "result": "allow"
},
{
    "mob": ["minecraft:blaze"],
    "minlight": 8,
    "mincount": {
        "amount": 8,
        "perchunk": true
    },
    "result": "deny"
}
McJty commented 5 years ago

Use "default" instead of "allow"

Insane96 commented 5 years ago

Still spawning ignoring light level

McJty commented 5 years ago

Remove your maxlight/minlight tests

Insane96 commented 5 years ago

Nope 2019-07-30_10 10 40

McJty commented 5 years ago

Turn on /ctrldebug mode and check your output (log) to see which rules are succeeding. Maybe that gives more info

McJty commented 5 years ago

Also give me your full current json's (everything)

Insane96 commented 5 years ago

Log after I've enabled degug mode: https://gist.github.com/Insane96/0ada6248ef054dff52f5cdf3e0742476

potentialspawn.json and spawn.json: https://gist.github.com/Insane96/d620e5af1b2969f037e0e82ad1e97b9e