Skip to content

Commit

Permalink
sort filtered items
Browse files Browse the repository at this point in the history
  • Loading branch information
Pilzinsel64 committed Jan 10, 2025
1 parent d64db1f commit 8d243b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/zerofall/ezstorage/gui/GuiStorageCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import net.minecraft.client.gui.FontRenderer;
Expand Down Expand Up @@ -197,9 +198,6 @@ protected void keyTyped(char typedChar, int keyCode) {
super.keyTyped(typedChar, keyCode);
}
}
if (keyCode == 63) {
this.tileEntity.sortInventory();
}
}

private void updateFilteredItems() {
Expand All @@ -218,6 +216,8 @@ private void updateFilteredItems() {
} else {
filterItems(searchText.toLowerCase());
}

Collections.sort(filteredList, new ItemGroup.CountComparator());
}

private void filterItems(String searchText) {
Expand Down

0 comments on commit 8d243b6

Please sign in to comment.