InventoryTweak sorting support (#3603)

This commit is contained in:
fscan
2018-07-14 21:07:00 +02:00
committed by GitHub
parent 67c733b418
commit f4ef7edf86
5 changed files with 61 additions and 5 deletions
+3 -3
View File
@@ -87,7 +87,7 @@ public class ItemSorters
return CONFIG_BASED_SORT_BY_NAME.compare( o1, o2 );
}
final int cmp = api.compareItems( o1.asItemStackRepresentation(), o2.asItemStackRepresentation() );
final int cmp = api.compareItems( o1.createItemStack(), o2.createItemStack() );
return applyDirection( cmp );
}
};
@@ -120,8 +120,8 @@ public class ItemSorters
}
private static int applyDirection( int cmp )
{
if ( getDirection() == SortDir.ASCENDING )
{
if( getDirection() == SortDir.ASCENDING )
{
return cmp;
}