From 0013724e51aadbde985b5e5603e4b176ad4b05c0 Mon Sep 17 00:00:00 2001 From: plulsls Date: Mon, 28 Jun 2021 23:35:09 +0800 Subject: [PATCH] update sort --- .../plusls/ommc/feature/sortInventory/SortInventoryUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/plusls/ommc/feature/sortInventory/SortInventoryUtil.java b/src/main/java/com/plusls/ommc/feature/sortInventory/SortInventoryUtil.java index 54fbc4a..3ad62fb 100644 --- a/src/main/java/com/plusls/ommc/feature/sortInventory/SortInventoryUtil.java +++ b/src/main/java/com/plusls/ommc/feature/sortInventory/SortInventoryUtil.java @@ -168,7 +168,8 @@ private static int cmp(ItemStack a, ItemStack b) { return ShulkerBoxItemUtil.cmpShulkerBox(a.getTag(), b.getTag()); } if (aId == bId) { - return a.getCount() - b.getCount(); + // 物品少的排在后面 + return b.getCount() - a.getCount(); } return aId - bId; }