Jump to content

Position getArea() method?


Recommended Posts

Posted (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 by Explv
  • Like 5

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...