Replaces all custom number comparisons with java provided ones. (#3434)
This commit is contained in:
@@ -80,9 +80,9 @@ public class ItemSorters
|
||||
{
|
||||
if( getDirection() == SortDir.ASCENDING )
|
||||
{
|
||||
return compareLong( o2.getStackSize(), o1.getStackSize() );
|
||||
return Long.compare( o2.getStackSize(), o1.getStackSize() );
|
||||
}
|
||||
return compareLong( o1.getStackSize(), o2.getStackSize() );
|
||||
return Long.compare( o1.getStackSize(), o2.getStackSize() );
|
||||
}
|
||||
};
|
||||
private static IInvTweaks api;
|
||||
@@ -124,45 +124,6 @@ public class ItemSorters
|
||||
}
|
||||
}
|
||||
|
||||
public static int compareInt( final int a, final int b )
|
||||
{
|
||||
if( a == b )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if( a < b )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
public static int compareLong( final long a, final long b )
|
||||
{
|
||||
if( a == b )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if( a < b )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
public static int compareDouble( final double a, final double b )
|
||||
{
|
||||
if( a == b )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if( a < b )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
private static SortDir getDirection()
|
||||
{
|
||||
return Direction;
|
||||
|
||||
Reference in New Issue
Block a user