blob: 97b2b9c1a2249bba2b7a29bf440fb049ab90e3ac [file] [log] [blame] [raw]
package li.cil.oc.common.block
import cpw.mods.fml.common.registry.GameRegistry
import li.cil.oc.common.tileentity.TileEntityKeyboard
import net.minecraft.world.World
import net.minecraftforge.common.ForgeDirection
class BlockKeyboard(val parent: BlockMulti) extends SubBlock {
GameRegistry.registerTileEntity(classOf[TileEntityKeyboard], "oc.keyboard")
val unlocalizedName = "Keyboard"
// ----------------------------------------------------------------------- //
// Tile entity
// ----------------------------------------------------------------------- //
override def hasTileEntity = true
override def createTileEntity(world: World, metadata: Int) = new TileEntityKeyboard
// ----------------------------------------------------------------------- //
// Block rotation
// ----------------------------------------------------------------------- //
override def getValidRotations(world: World, x: Int, y: Int, z: Int) = validRotations
/** Avoid creating new arrays at the cost of this possibly getting modified. */
private val validRotations = Array(
ForgeDirection.SOUTH,
ForgeDirection.WEST,
ForgeDirection.NORTH,
ForgeDirection.EAST)
}