Solved Another way to get nearby entities?

Discussion in 'Spigot Plugin Development' started by Kuba6PL9, Oct 4, 2016.

  1. So, I was using World.getNearbyEntities(stuff), but it seems like it's not a part of a new engine that i have and is there any way around?
  2. What are you trying to do?
  3. Entity.getNearbyEntities(5,5,5)?
  4. It depends on the powerUP, but in general I have a location and radius and i want to get entities that are in this area
  5. If there is no other way I guess, im going to create a new entity every time i need to do this... damn...
  6. well i see spigot do have getWorld().getNearbyEntities(arg0, arg1, arg2, arg3) but i dont understand how its "but it seems like it's not a part of a new engine" for you?
  7. Nah, I guess hosting just uses an incomplete engine...
  8. What do you mean with "engine"?
  9. spigot, I downloaded it from hosting to test the issue (becouse my local works fine) and i found out that it has no World.getNearbyEntities(stuff)
  10. Get all entities of the world an iterate through them. Now get on each the location and then calculate the distance (using the built in methods or e.g. Pythagoras) from it to sour origin and check if the calculated distance is less or equal to your radius
    (Then NO entity is required)
  11. I guess, If this hosting isn't capable of "getting fixed" im going to my own getNearbyEntities
  12. you apparently can download the spigot.jar, why don't you upload a new one.