
Using entities that aren't mobs in hordes causes game crash
Closed this issue ยท 12 comments
Using UndeadNights 1.2.0-beta4 on Fabric, Minecraft 1.20.1. Though this is likely not version dependent.
Reproduction:
Spawn a horde which has entities that aren't mobs, for example tnt, fireball or wither_skull.
Game crashes instantly.
Config used:
undeadnights_horde_mobs_config.json
Crash logs:
crash-2025-04-26_13.09.21-server.txt
crash-2025-04-26_13.08.12-server.txt
Thanks for your intensive testing :)
For now, I will add a check for non-mobs entities and ignore those <-- (that didn't age well :D)
Ah, a shame. I was looking forward to using those for extra effects.
Though, they wouldn't have been too useful without the ability to summon them with custom NBT data.
Talking of that, is there a plan to add NBTs to the horde config?
Passengers would definitely be one. Other than spider jockeys, it could enable some interesting horde mob combinations.
NoGravity and Motion would have been useful for projectiles or even TNT summoned, if it would have been possible.
active_effects is another good one for applying potion effects to only a handful of mobs at the start.
And finally, equipment.
Those are the more generic examples, but some entities have NBT specific only to them, like the fuse for TNT.
I guess I could rebuild the "summon" command for spawning the mobs in a horde...
Well... ;)
{
"configVariant": 2,
"defaultHordeId": "1",
"hordes": [
{
"hordeName": "Test",
"horde1": [
{
"mobId": "undeadnights:horde_zombie",
"countMin": "8",
"countMax": "10",
"extraSpawnInfo": "none",
"nbtTags": "{CustomName:'\"Bob\"'}"
},
{
"mobId": "minecraft:wither_skull",
"countMin": "3",
"countMax": "6",
"extraSpawnInfo": "none"
}
]
}
],
"internalConfigVersion": 1
}
If this works now and you won't find other issues, I think I will go ahead and release 1.2.0 :)
Got a little preoccupied with work and stuff, I'll see if I can take a look at it today.
Alright, I had a chance to test things.
Everything seems to be working as intended.
Though, there appears to be one quirk of the Minecraft AI that seems to be a limitation. When I make mob towers, the AI in control seems to be the top one in some cases. But the horde mob is the bottom one, as that's how the Passenger NBT works. This can cause there to be no aggro in some cases.
But I think this can be overlooked for now. I doubt that this mob stacking would be too common, and if the top mob is a horde_zombie, it aggroes like the others and it just works again, so it can be circumvented.
Finally, here's my favourite piece of creation: