Adding a way to manage slot order
ItsTheBdoge opened this issue · 5 comments
Please describe the new feature or change.
Currently the order of which slot is first is based on alphabetical order, I would want a way to organize these.... maybe have it based on whats registered first or add a slot priority value to determine what the slots would be
Please describe why you want this feature.
visually it doesn't make sense for some slots to be above others (body over head, etc.)
This is something I'm eager to figure out, but it's a little tricky. It can't be based off what is registered first because mods aren't always loaded in the same order, which would cause the slot order to change unexpectedly. Implementing slot priority can get a bit messy as those values would be relative and may not end up with the result you want when you factor in other mods also implementing different priorities.
I'm currently toying around with the idea of implementing slot "sections". Slots can be defined into five sections: head, chest, legs, feet, and miscellaneous. This will give some more natural ordering to the slots without too much overhead in how slots are already registered.
The section idea seems interesting but, in my opinion, seems to be a bit limiting. Personally I feel a priority system would be the best for management. Could it be possible to have a priority system where a mod can register a slots priority but can be overwritten via config? config slot priority overwriting default slot priorities would correct the results when multiple mods are included
I think there's a way I can include both sections and a priority system, which should be enough for most use-cases, including a way to overwrite them. But since this requires revisiting and possibly overhauling the whole registry system, I'm probably going to put this feature on hold until 1.16 so I can do it right without worrying about backwards compatibility.
Slot priorities with possible config overrides have been added to the 1.16.1 port.