Adept Posted March 22, 2017 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?
Explv Posted March 22, 2017 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
Team Cape Posted March 22, 2017 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
Adept Posted March 22, 2017 Author 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.