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

IPolygonalSelection points are not in the correct order #110

Open
recorehosting opened this issue Sep 28, 2023 · 1 comment
Open

IPolygonalSelection points are not in the correct order #110

recorehosting opened this issue Sep 28, 2023 · 1 comment

Comments

@recorehosting
Copy link

IPolygonalSelection points order are changed when your using Set

So change
return new IPolygonalSelection() {
@OverRide
public Set getPoints() {
return ((Polygonal2DRegion) selection).getPoints().stream()
.map(BlockVector2::toBlockVector3)
.map(vector -> BukkitAdapter.adapt(world, vector))
.collect(Collectors.toSet());
}

to

return new IPolygonalSelection() {
@OverRide
public List getPoints() {
return ((Polygonal2DRegion) selection).getPoints().stream()
.map(BlockVector2::toBlockVector3)
.map(vector -> BukkitAdapter.adapt(world, vector))
.collect(Collectors.toList());
}

to guaranteed order of list.

@recorehosting recorehosting changed the title IPolygonalSelection points re not in the correct order IPolygonalSelection points are not in the correct order Sep 28, 2023
@recorehosting
Copy link
Author

It will mess up dynmap when using not the correct order.
dynmap

This one is with List
dynmap2

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

No branches or pull requests

1 participant