Class KeyMappingCompareMixin
java.lang.Object
dev.munebase.dynamickeybinds.mixin.KeyMappingCompareMixin
Mixin override for key mapping ordering that tolerates missing runtime map entries.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(net.minecraft.client.KeyMapping other) Compares key mappings using MAP indices and falls back to name ordering when needed.
-
Constructor Details
-
KeyMappingCompareMixin
public KeyMappingCompareMixin()
-
-
Method Details
-
compareTo
public int compareTo(net.minecraft.client.KeyMapping other) Compares key mappings using MAP indices and falls back to name ordering when needed. This mixin ensures runtime key mappings without MAP entries still compare safely.- Parameters:
other- other key mapping to compare against- Returns:
- comparison result used for ordering
-