Adept Posted March 22, 2017 Share Posted March 22, 2017 The Entity interface provides a getArea method to generate an area of a certain radius around an entity. Does the API provide something similar to generate an area around a position? Quote Link to comment Share on other sites More sharing options...
Explv Posted March 22, 2017 Share Posted March 22, 2017 (edited) 3 hours ago, Adept said: The Entity interface provides a getArea method to generate an area of a certain radius around an entity. Does the API provide something similar to generate an area around a position? Just write your own? Something like: public Area getArea(Position pos, int size) { return new Area(pos.translate(-size, -size), pos.translate(size, size)); } Edited March 22, 2017 by Explv 5 Quote Link to comment Share on other sites More sharing options...
Team Cape Posted March 22, 2017 Share Posted March 22, 2017 1 hour ago, Explv said: Just write your own? Something like (sorry on phone): public Area getArea(Position pos, int size) { return new Area(pos.translate(-size, -size), pos.translate(size, size)); } wouldnt be a bad addition to the API though Quote Link to comment Share on other sites More sharing options...
Adept Posted March 22, 2017 Author Share Posted March 22, 2017 24 minutes ago, Imateamcape said: wouldnt be a bad addition to the API though Exactly my point. Thanks Explv for the snippet though. Quote Link to comment Share on other sites More sharing options...