-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
Cleanup3 #2414
Cleanup3 #2414
Conversation
Looks good to me. Maybe add some unit tests for the regrowing of the IntegerMap. At least to me, it is not obvious that it works as expected. What about reformatting the whole project to a consistent indention (4 spaces instead of tabs) in this course? |
I have extracted the method to a new util class, so it is still usable from other classes. It is basically a copy of the ceilingPowerOfTwo method from guavas IntMath, but the 1.8 guava version is too old. |
I'm thinking that it might be better for some codestyle related cleanups to be in a different PR. The way you change some if condition body locations, import order, ... should be defined by a fixed codestyle settings (such as google-style) and enforced via checkstyle. I'm ok with the replacement of some method calls, lists, .... tho 👍 |
@dmulloy2 It would be great to have this merged and ProtocolLib 5.1.0 being released ASAP as Minecraft 1.20 will be released in 2 days. |
This version (
|
This is mainly my old #1776 pr for modern protocollib, with a few additions (and minus the breaking IntSet change).
The most notable one is the fast growing algorithm for IntegerMap, which directly calculates the next power of 2 instead of looping and checking for an overflow.