blob: e739735569f518d07b4b8ada1e06ec9971f9e97b [file] [log] [blame] [raw]
package li.cil.oc.common.item
import li.cil.oc.Settings
import net.minecraft.client.renderer.texture.IconRegister
import net.minecraft.item.ItemStack
class Memory(val parent: Delegator, val tier: Int) extends Delegate {
val unlocalizedName = "Memory"
val kiloBytes = Settings.get.ramSizes(tier)
override def displayName(stack: ItemStack) =
Some(parent.getItemStackDisplayName(stack) + " (%dKB)".format(kiloBytes))
override def registerIcons(iconRegister: IconRegister) {
super.registerIcons(iconRegister)
icon = iconRegister.registerIcon(Settings.resourceDomain + ":ram" + tier)
}
}