Applied-Energistics-2-tiler.../container/implementations/CraftingCPURecord.java

32 lines
651 B
Java
Raw Normal View History

2014-08-05 05:32:47 +02:00
package appeng.container.implementations;
import appeng.api.networking.crafting.ICraftingCPU;
import appeng.util.ItemSorters;
public class CraftingCPURecord implements Comparable<CraftingCPURecord>
{
ICraftingCPU cpu;
long size;
int processors;
public String myName;
public CraftingCPURecord(long size, int proc, ICraftingCPU server) {
this.size = size;
this.processors = proc;
this.cpu = server;
myName = server.getName();
}
@Override
public int compareTo(CraftingCPURecord o)
{
int a = ItemSorters.compareLong( o.processors, processors );
if ( a != 0 )
return a;
return ItemSorters.compareLong( o.size, size );
}
}