Memory consideration
Is your feature request related to a problem? Please describe. MapPalette uses a java.util.HashMap with an Integer value. GrimAC likes keeping millions of instances loaded.
Describe the solution you'd like As the comment above the field states,
// TODO: Can we use fastutils here?
private final HashMap<Object, Integer> stateToId = new HashMap<>();
FastUtil would work fine here, basically any implementation of an Object2IntMap.
Describe alternatives you've considered to solve your solution without us adding this as a feature? It's a simple change I would've submitted a pull request for if it weren't for the 5 different platforms I'd have to test and worry about shading.
It's a simple change I would've submitted a pull request for if it weren't for the 5 different platforms I'd have to test and worry about shading.
like you've said, adding fastutil to the api would mean we either have to shade it or rely on the platform to provide a working version for us to use (and we currently support 1.8 which has a lot of random/strange forks), so this isn't quite as simple as it might seem
If you're worried about the jar size, the simplest way then would be to include an existing class or two from fastutil or any other library that's adequately licensed.