mirror of
https://github.com/PaperMC/Paper.git
synced 2025-05-26 04:20:33 +00:00
Mojangs EQUIPMENT_SLOT_MAPPING uses an Int2ObjectArrayMap and hence technically does provide iteration stability, however it is filled from a MapN, which destroys the well order of the entries. To iterate from smallest to largest inventory index correctly, this commit introduces a sorted array based on the EQUIPMENT_SLOT_MAPPING.