What you should do is look for where it is being called not where it is being made/overriden. This way you can check the other requirements for an entity to spawn. As i dont know what else is checked, but you should look at the super method of getCanSpawnHere and override it if one of those is a problem.