Posted July 14, 20169 yr Hey guys, I've made a moving entity. Now I wanna spawn entities(like sheep or cow) automatically beside the road which it just passed by. Which method I need to use?
July 14, 20169 yr Author Thanks buddy, I've checked EntityRegistry.addSpawn: EntityRegistry.addSpawn(entityClass, weightedProb, min, max, typeOfCreature, biomes); But after reading the addSpawn method, I still don't know with which parameter I can choose where it spawn?
July 14, 20169 yr If you want to spawn an entity at a specific position you should use: EntityCow cow = new EntityCow(world); cow.setPosition(x, y, z);
July 14, 20169 yr you still need to call World#spawnEntityInWorld (I think that was the method name) on the world object where u want to spawn the entity
July 14, 20169 yr I guess after setposition I still need a method to spawn the entity, right? Yes, you still need to call world.spawnEntityInWorld(cow); to actually spawn the entity in the world As a side note: Make sure you only spawn the entity on the server (!world.isRemote) I made the Mob Particles mod, you can check it out here: http://www.minecraftforum.net/topic/2709242-172-forge-mob-particles/
July 14, 20169 yr Use EntityRegistry.addSpawn No, this is for having entities spawn naturally in biomes, not in a specific circumstance like qxjl1010 needs. http://minecraft.curseforge.com/members/sblectric/projects
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.