Skip to content

Commit

Permalink
Sorting species list in creative tab
Browse files Browse the repository at this point in the history
  • Loading branch information
SimoMett committed Apr 1, 2024
1 parent 525fe9b commit a5f0a51
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public Collection<ItemStack> getAllSpeciesCollection()
{
Collection<ItemStack> collection = new ArrayList<>();

for(FungusSpecies species : speciesHashMap.values())
List<FungusSpecies> sortedSpecies = speciesHashMap.values().stream().sorted(Comparator.comparing(a -> a.defaultTraits.species)).toList();
for(FungusSpecies species : sortedSpecies)
{
ItemStack e;
if(species.fungusType.equals("colored_crimson_fungus"))
Expand Down

0 comments on commit a5f0a51

Please sign in to comment.