Getting Nearby Entities from Block?

Discussion in 'Plugin Development' started by SlimeZAP, Dec 31, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    SlimeZAP

    How would I get all nearby entities from a block? What would the code look like?

    Thanks so much for the help - Zach
     
  2. Offline

    kabbage

    You have to loop through all entities in the world the block is in. If the entity is within x meters of the block, add it to a list of entities. When the loop is done, you'll have a list of all nearby entities.
     
  3. Offline

    Jogy34

    Or you could spawn an entity inside the block and use the getNearbyEntities() method
     
Thread Status:
Not open for further replies.

Share This Page