blob: 29335e0fb2f163be8eaa7628d41279e6bb8a3b04 [file] [log] [blame] [raw]
package li.cil.oc.common.block
import li.cil.oc.Settings
import li.cil.oc.client.Textures
import li.cil.oc.common.GuiType
import li.cil.oc.common.tileentity
import net.minecraft.client.renderer.texture.IIconRegister
import net.minecraft.world.World
// TODO Remove in 1.7
class Switch extends SimpleBlock with traits.GUI {
override protected def customTextures = Array(
None,
Some("SwitchTop"),
Some("SwitchSide"),
Some("SwitchSide"),
Some("SwitchSide"),
Some("SwitchSide")
)
override def registerBlockIcons(iconRegister: IIconRegister) = {
super.registerBlockIcons(iconRegister)
Textures.Switch.iconSideActivity = iconRegister.registerIcon(Settings.resourceDomain + ":SwitchSideOn")
}
// ----------------------------------------------------------------------- //
override def guiType = GuiType.Switch
override def hasTileEntity(metadata: Int) = true
override def createTileEntity(world: World, metadata: Int) = new tileentity.Switch()
}