Posted May 28, 20178 yr Hello, I'm working on a bug in my mod and found a behavior that seems really weird. My mobs need custom spawning behavior in the world. I'm doing the logic to determine spawning is the getCanSpawnHere method. To my understanding, it returns whether the mob can spawn at the given spot, and if it returns false, then the mob spawn is cancelled. I was debugging some code where my mobs were spawning everywhere, but getCanSpawnHere is supposed to only let them spawn near villages. All of my logic looked correct, but even when the method returns false mobs still spawn. This results in mobs spawning even away from villages. I even explicitly tried putting return false so the mobs theoretically can't spawn. But they still are spawning even when getCanSpawnHere returns false! So how should I properly use getCanSpawnHere? It seems to be not working. Thanks. Code getCanSpawnHere method Register entity Register spawn All files Thank you! Edited May 30, 20178 yr by CrowsOfWar Clarify MC version
June 1, 20178 yr Author Bumping since this is still a problem. I'm new here and I didn't see anything about bumping being prohibited, but please let me know if bumping is not allowed on this forum.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.