Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poly2 d region volume fix #157

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Rosstail
Copy link

A little patch in order to fix volume calculations of Poly2D regions

Copy link

@Emix33 Emix33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this implementation essentially repeats #57 and will probably not be accepted by the author of this plugin as it also calculates the mathematical volume (with fractions of blocks) and not the minecraft volume where a block is either fully included in the region or not.

@Override
public int getVolume() {
if (region.getPoints().size() > 4) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Polygonal regions can also have 4 points. The lines between them are just not all alligned to the minecraft blockgrid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants