Best way of using .getNearbyEntities() ?

Discussion in 'Plugin Development' started by bobbob1870, Oct 19, 2013.

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

    bobbob1870

    So simply put I'm using an enhanced for loop to loop through the entity list from .getNearbyEntities() however I have many checks that need to be in place, some that need to be checked per entity and some that check information about the player. Simply put I was wonder if it would be better to have as many checks as possible outside the for loop but in turn have multiple for loops or have most of the checks inside the for loop and only having one loop.
     
  2. Offline

    MineDoubleSpace

    bobbob1870 I would check it inside the loop, because you want to check for each entity.
     
Thread Status:
Not open for further replies.

Share This Page