Inventory Tweaks [1.12 only]

Inventory Tweaks [1.12 only]

127M Downloads

Sorting option: Item damage ranges/sort by damage

Derpford opened this issue ยท 0 comments

commented

Minecraft Version: 1.7.10
Inventory Tweaks Version: 1.58
At the moment, you can specify damage values for items--for instance, wool color.

However, suppose I have a pair of pickaxes--both stone, but one is at 5% durability and the other is at 50%.
I want the highest-durability pick, because I want to save the 5% pick for repairs. However, when I sort, the lowest-durability pick is sorted first. This is a sane default, as most people would rather wear the pick out and free up an inventory slot, but there are cases where you may want something different (i.e., if you'd rather have your most durable sword in your hotbar).

So, I propose a new operator for item damage. Where the current system is:
mod:item-damage
I'd add these alternate versions:

mod:item-+
mod:item--
mod:item-<X
mod:item->X

Using + in place of the damage seeks the item with the highest remaining durability (i.e., the lowest damage). Using - does the opposite, explicitly searching for the least remaining durability (highest damage value). X work as you'd expect--less than X and greater than X, respectively (for instance, pickaxe-<300 only matches picks that have a damage value less than 300).