Fix for sort error
This commit is contained in:
@@ -143,6 +143,10 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor
|
||||
Collections.sort(storages, new Comparator<IStorage>() {
|
||||
@Override
|
||||
public int compare(IStorage s1, IStorage s2) {
|
||||
if (s1.getPriority() == s2.getPriority()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (s1.getPriority() > s2.getPriority()) ? -1 : 1;
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user