Posted August 7, 201312 yr I'm trying to make a block that will lure all the animals in a 5 block radius to it. Right now I have a mess of tile entities and entities to get the closest animal with this... EntityLiving closestEntity = (EntityLiving) this.worldObj.findNearestEntityWithinAABB(watchedClass, this.boundingBox.expand(5, 4, 5), this); However that only returns the closest entity. How would I get all the entities in an area? Also, if there is a way to do this without tile entities how could it be done?
August 7, 201312 yr Author nvm, found the answer within this method getEntitiesWithinAABB. However my question about doing this without a tile entity spawning another entity still stands. also is there a way to set an entity.task by force?
August 7, 201312 yr You could add an AI task to the entities that looks for the block in their shouldExecute(), kind of like EntityAIOcelotSit. I'm fixing the stupid villagers. http://www.minecraftforum.net/topic/1588460-
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.