please learn basic java before modding minecraft
i already told you what you have to do.
the code part genericName.addSpawn... is correct,
but you put a method in a method that is completely wrong
in addition you never use the event
Alright... so what does that mean I need to do to access them in 1.16.5? How do I convert the code to use the Mojang names? I'm struggling to find any real examples of what the differences between them actually are.