mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-28 02:48:14 -05:00
Update #48 - Added some features from OptiFine
This commit is contained in:
15
sources/main/java/net/optifine/CustomItemsComparator.java
Normal file
15
sources/main/java/net/optifine/CustomItemsComparator.java
Normal file
@ -0,0 +1,15 @@
|
||||
package net.optifine;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
public class CustomItemsComparator implements Comparator {
|
||||
public int compare(Object o1, Object o2) {
|
||||
CustomItemProperties customitemproperties = (CustomItemProperties) o1;
|
||||
CustomItemProperties customitemproperties1 = (CustomItemProperties) o2;
|
||||
return customitemproperties.weight != customitemproperties1.weight
|
||||
? customitemproperties1.weight - customitemproperties.weight
|
||||
: (!Config.equals(customitemproperties.basePath, customitemproperties1.basePath)
|
||||
? customitemproperties.basePath.compareTo(customitemproperties1.basePath)
|
||||
: customitemproperties.name.compareTo(customitemproperties1.name));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user