Jump to content

Position getArea() method?


Adept

Recommended Posts

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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