Skip to content

Poly2 d region volume fix#157

Open
Rosstail wants to merge 3 commits intoalex9849:masterfrom
Rosstail:Poly2D-region-volume-fix
Open

Poly2 d region volume fix#157
Rosstail wants to merge 3 commits intoalex9849:masterfrom
Rosstail:Poly2D-region-volume-fix

Conversation

@Rosstail
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

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.

2 participants