Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public GroundItem itemToLoot(final int...ids) {
- GroundItem[] loot = GroundItems.getLoaded();
- GroundItem lootit = null;
- int Dist = 20;
- for (GroundItem N : loot) {
- for (int id : ids) {
- if ( N.getItem().getId() == id) {
- int distanceToLoot = Calculations.distanceTo(N);
- if (distanceToLoot < Dist) {
- lootit = N;
- }
- }
- }
- }
- return lootit;
- }
Add Comment
Please, Sign In to add comment