package ru.dbotthepony.mc.otm.compat.jei

import mezz.jei.api.gui.drawable.IDrawable
import net.minecraft.client.gui.GuiGraphics
import ru.dbotthepony.mc.otm.client.render.MatterySprite

class SkinDrawable(val element: MatterySprite) : IDrawable {
	override fun getWidth(): Int {
		return element.width.toInt()
	}

	override fun getHeight(): Int {
		return element.height.toInt()
	}

	override fun draw(graphics: GuiGraphics, xOffset: Int, yOffset: Int) {
		element.render(graphics, xOffset.toFloat(), yOffset.toFloat())
	}
}
