lucko / helper

A collection of utilities and extended APIs to support the rapid and easy development of Bukkit plugins.
MIT License
456 stars 87 forks source link

Bucket doesn't split elements into different partition #85

Open awsqed opened 4 years ago

awsqed commented 4 years ago

When I run it on the server it doesn't return the expected result. image

image

image

Smaller partition size for clearer demonstration (32 partitions): image

EDIT: I'm using the main helper module, version 5.6.2, with a standalone plugin (version 5.6.4).

Bestle commented 2 years ago

https://github.com/lucko/helper/blob/master/helper/src/main/java/me/lucko/helper/bucket/AbstractBucket.java#L240

This is always 0 as sets contained are equal, so the only partitioning strategy that currently works is "RANDOM".

lucko commented 2 years ago

Thanks for figuring it out - sorry I never got around to doing it myself.

I've added a fix above, let me know if that sorts it.