Guest User

Untitled

a guest
Jan 21st, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public GroundItem itemToLoot(final int...ids) {
  2. GroundItem[] loot = GroundItems.getLoaded();
  3. GroundItem lootit = null;
  4. int Dist = 20;
  5. for (GroundItem N : loot) {
  6. for (int id : ids) {
  7. if ( N.getItem().getId() == id) {
  8. int distanceToLoot = Calculations.distanceTo(N);
  9. if (distanceToLoot < Dist) {
  10. lootit = N;
  11. }
  12. }
  13. }
  14. }
  15. return lootit;
  16. }
Add Comment
Please, Sign In to add comment