March 22, 20178 yr 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?
March 22, 20178 yr 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, 20178 yr by Explv
March 22, 20178 yr 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
March 22, 20178 yr Author 24 minutes ago, Imateamcape said: wouldnt be a bad addition to the API though Exactly my point. Thanks Explv for the snippet though.
Create an account or sign in to comment