-- Carpets
function btmt.register_carpets(name,desc,tiles,recipe)
core.register_node("btmt:" .. name, {
		description = desc .. " Carpet",
		tiles = {tiles},
		drawtype = "nodebox",
		paramtype = "light",
		--paramtype2 = "facedir",
		is_ground_content = false,
		groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3,
				flammable = 3, carpet = 1},
		sounds = default.node_sound_defaults(),
		
		node_box = { type = "fixed", fixed =  {{-0.5, -0.5, -0.5, 0.5,-0.4, 0.5}}},
	        selection_box = {type = "fixed", fixed = {{-0.5, -0.5, -0.5, 0.5,-0.4, 0.5}}},
	})

	core.register_craft{
		type = "shapeless",
		output = "btmt:" .. name,
		recipe = {recipe,recipe},
	}

end

btmt.register_carpets("white","White","wool_white.png","wool:white")
btmt.register_carpets("grey","Grey","wool_grey.png","wool:grey")
btmt.register_carpets("dark_grey","Dark Grey","wool_dark_grey.png","wool:dark_grey")
btmt.register_carpets("black","Black","wool_black.png","wool:black")
btmt.register_carpets("violet","Violet","wool_violet.png","wool:violet")
btmt.register_carpets("blue","Blue","wool_blue.png","wool:blue")
btmt.register_carpets("cyan","Cyan","wool_cyan.png","wool:cyan")
btmt.register_carpets("dark_green","Dark Green ","wool_dark_green.png","wool:dark_green")
btmt.register_carpets("green","Green","wool_green.png","wool:green")
btmt.register_carpets("yellow","Yellow","wool_yellow.png","wool:yellow")
btmt.register_carpets("brown","Brown","wool_brown.png","wool:brown")
btmt.register_carpets("orange","Orange","wool_orange.png","wool:orange")
btmt.register_carpets("red","Red","wool_red.png","wool:red")
btmt.register_carpets("magenta","Magenta","wool_magenta.png","wool:magenta")
btmt.register_carpets("pink","Pink","wool_pink.png","wool:pink")

