mirror of
http://git.eaglercraft.rip/eaglercraft/eaglercraft-1.8.git
synced 2025-04-30 02:01:59 -05:00
16 lines
681 B
Java
16 lines
681 B
Java
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));
|
|
}
|
|
}
|