2014-07-09 10:17:11 +02:00
|
|
|
package appeng.client.me;
|
|
|
|
|
|
|
|
import net.minecraft.util.StatCollector;
|
|
|
|
import appeng.tile.inventory.AppEngInternalInventory;
|
2014-07-13 03:20:21 +02:00
|
|
|
import appeng.util.ItemSorters;
|
2014-07-09 10:17:11 +02:00
|
|
|
|
2014-07-13 03:20:21 +02:00
|
|
|
public class ClientDCInternalInv implements Comparable<ClientDCInternalInv>
|
2014-07-09 10:17:11 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
final public String unlocalizedName;
|
|
|
|
final public AppEngInternalInventory inv;
|
2014-07-13 03:20:21 +02:00
|
|
|
final public long id;
|
|
|
|
final public long sortBy;
|
2014-07-09 10:17:11 +02:00
|
|
|
|
2014-07-13 03:20:21 +02:00
|
|
|
public ClientDCInternalInv(int size, long id, long sortBy, String unlocalizedName) {
|
2014-07-09 10:17:11 +02:00
|
|
|
inv = new AppEngInternalInventory( null, size );
|
|
|
|
this.unlocalizedName = unlocalizedName;
|
|
|
|
this.id = id;
|
2014-07-13 03:20:21 +02:00
|
|
|
this.sortBy = sortBy;
|
2014-07-09 10:17:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public String getName()
|
|
|
|
{
|
|
|
|
String s = StatCollector.translateToLocal( unlocalizedName + ".name" );
|
|
|
|
if ( s.equals( unlocalizedName + ".name" ) )
|
|
|
|
return StatCollector.translateToLocal( unlocalizedName );
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
2014-07-13 03:20:21 +02:00
|
|
|
@Override
|
|
|
|
public int compareTo(ClientDCInternalInv o)
|
|
|
|
{
|
|
|
|
return ItemSorters.compareLong( sortBy, o.sortBy );
|
|
|
|
}
|
|
|
|
|
2014-07-09 10:17:11 +02:00
|
|
|
}
|