Topic category: Help with Minecraft modding (Java Edition)
Hi, I want to make a structure for my custom mobs to generate in. But I wanted to have them generate randomly, like you have to visit multiple structures to collect them all. So I made a spawner enttity and I placed them in the structure's schematic. Then later and made so that they despawn itself on spawning and will choose at a random percentage to spawn my mobs.
But when I actually test out to see the structure generation in the world. The game failed to spawn any of my mobs. Vanilla animals that are included in the structures spawn like normal however. Idk if its because I set it so the spawner entity not to spawn naturally that it screwed up the spawning during structure generation.
Any help would be much appreciated.
Let me explain it again, I am making a mod about dwarf with different dwarf professions, and I want you to travel around the world and collect them in their Dwarven Blacksmith. But what professions are in a Blacksmith is decided randomly.
So far, the No AI living entity that responsible for spawn in a random dwarf profession hasn't been generated in the structures, despite the living animals in the barn section spawned in like normal. So I wonder if that is because the spawning entity is set to not be able to spawn naturally anywhere. So the game somehow never spawn them in their structures.
I have entities in my mod that are unable to naturally spawn, but still spawn in correctly from procedures or /summon commands, so I don't think disabling natural spawning is what's doing it.
Have you tried without the procedure to despawn the spawner entity, to see whether it's not appearing at all or it's just failing to spawn other things before it deletes itself?
Have you tried summoning it with a command to see if it appears, and if it correctly spawns a random profession when it does?
Have you tried changing the procedure from "on initial entity spawn" to "on entity tick update", in case the on spawn procedure simply isn't triggering for some reason when loaded in from a structure? (If the procedure ends with despawning the entity its attached to, it should still only fire once, because on the next tick it will be gone.)
Is it by chance accidentally set as a mob, and the world you're testing is on Peaceful difficulty? (I know that one's unlikely, just trying to think of things that would prevent entities from spawning correctly.)