"mincount" doesn't appear to be functioning
darchitectlp opened this issue ยท 4 comments
Playing Craft of the Titans 2 right now, and suffering from bad lag in the Overworld. Dropped laggoggles into the pack and discovered I have HUNDREDS of zombie horses and skeleton horses everywhere (deep underground, swimming in the oceans, hiding in forests).
Boolyman has this in his spawn.json:
{ "dimension": 0, "mob": "minecraft:zombie_horse", "mincount": "6", "result": "deny" }, { "dimension": 0, "mob": "minecraft:skeleton_horse", "mincount": "6", "result": "deny" },
So, is his syntax wrong? Or is something else happening?
And can we get an example of how mincount uses it's second form of (from the wiki) "or else of the form "," to count the number of mobs of that type".
And how is the second form supposed to be used?
Thanks!
So using ctrlkill, I wiped out 567 zombie horses and 692 skeleton horses. Interestingly, "ctrlkill hostile" didn't get rid of them. Not sure what's causing it; I'll try adding the "onjoin" parameter to see if it helps (but that looks doubtful).
The second part of my question refers to the wiki:
mincount: string value that is either a number in which case it will count how many mobs of the given class are already in the world or else of the form "," to count the number of mobs of that type. That way you can have a rule file based on the number of mobs already present
What is the purpose of using "<amount>, <mob>"
? Is it so you can spawn a donkey if there are 20 horses in the world? Mostly I was asking just because I wanted to make sure my understanding is clear.
One last thing, which maybe I should make another issue for... In CoTT2, Boolyman has specified there should be no more than 20 of each passive at a given time:
{
"dimension": 0,
"mob": "Cow",
"mincount": "20",
"result": "deny"
},
{
"dimension": 0,
"mob": "Pig",
"mincount": "20",
"result": "deny"
},
{
"dimension": 0,
"mob": "Chicken",
"mincount": "20",
"result": "deny"
},
{
"dimension": 0,
"mob": "Sheep",
"mincount": "20",
"result": "deny"
},
However, while exploring, I now have loads of pigs, sheep, chickens, and cows spawning underground. So, if I'm understanding correctly, the second you create a rule, it totally overrides normal spawning rules (the standard passive rules of being spawned only on grass and where they can see the sky). Is that how it's supposed to work? If not, how can you set a mob to use it's default spawning rules, but then specify additional rules on top of that? Thank you so much for taking the time to reply!
I guess these are getting spawned using some special mechanic that isn't catched with this. Note also that this rule doesn't remove mobs that are already there.
You could try to add the 'onjoin: true' option (see documentation). It could possibly help with this but no guarantees.
I don't understand the second part of this question?
Ok, turns out it was Rough Mobs messing with undead horses. Updated it and everything seems fixed now. But, if you don't mind clarifying, regarding passives, if I add a rule (like boolyman did i.e. cap each passive at 20), does that mean I have to go in and write all the other rules that normally pertain to passives? Like only spawn on grass, and if you can see the sky and above y64?
Thanks so much.