mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 11:29:48 +07:00
Improved drill item selection
This commit is contained in:
parent
4e308d6600
commit
85767d4946
@ -211,8 +211,10 @@ public class Drill extends Block{
|
||||
}
|
||||
|
||||
itemArray.sort((item1, item2) -> {
|
||||
int type = Boolean.compare(item1.type == ItemType.material, item2.type == ItemType.material);
|
||||
int type = Boolean.compare(item1 != Items.sand, item2 != Items.sand);
|
||||
if(type != 0) return type;
|
||||
int amounts = Integer.compare(oreCount.get(item1, 0), oreCount.get(item2, 0));
|
||||
if(amounts != 0) return amounts;
|
||||
return Integer.compare(item1.id, item2.id);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user