Posted August 28, 201510 yr I am struggling with a problem with LivingSpawnEvent.CheckSpawn. It works perfectly fine for hostile mobs but passive mobs that are generated at chunk generation time (i.e. passive sheep, cows and so on) are not going through that even it seems. Even though according to the Minecraft code it should. Here is the code snippet: @SubscribeEvent public void onEntitySpawnEvent(LivingSpawnEvent.CheckSpawn event) { System.out.println("event.entity.toString() = " + event.entity.toString()); } This code works fine for hostile mob spawns. I can see the print in my console but nothing happens for passive mobs. Any clue?
August 29, 201510 yr Author Is there nobody who knows anything about this or can help me find a way to prevent passive mobs from spawning in freshly generated chunks? Thanks
August 29, 201510 yr this event is not fired for EntityAnimal or any derived class. try using EntityJoinWorld instead WIP mods: easyautomation, easyenergy, easyelectronics, easymoney, easytrasportation, easysecurity, easymultiverse, easyfactions, easymagick, easyalchemy, easyseasons
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.