Spectres exceed Ambient mobcap due to miscategorization
murphy-slaw opened this issue ยท 0 comments
There is a problem with the Spectre's mob category which causes them to spawn significantly above the ambient mob cap, especially if there are not enough other ambient mobs to
Spectres are registered as MONSTER:
public static final EntityType<Spectre> SPECTRE = register("spectre", EntityType.Builder.of(Spectre::new, MobCategory.MONSTER).sized(0.5F, 0.5F).clientTrackingRange(8).updateInterval(2).build(Galosphere.id("spectre").toString()));
but in the lichen caves biome, their spawner is set under AMBIENT:
"spawners": {
"ambient": [
{
"type": "minecraft:bat",
"maxCount": 8,
"minCount": 8,
"weight": 10
},
{
"type": "galosphere:spectre",
"maxCount": 8,
"minCount": 8,
"weight": 20
}
],
This causes weirdness where Spectres don't count towards the ambient mob cap, but they check the ambient mob cap to see if they can spawn.
If there aren't enough bats (or other modded ambient entities) in loaded chunks to fill the ambient cap, they can spawn in unlimited numbers. This is a pretty rare scenario, but one of my testers found a brightly lit lichen cave with sky access and it was spawning spectres by the thousands.