if minetest.get_modpath("doors") ~= nil then
--- DORRS : ==================================================================================
-- ACACIA
doors.register_trapdoor("btmt:acacia_trapdoor", {
	description = "Acacia Trapdoor",
	inventory_image = "doors_acacia_trapdoor.png",
	wield_image = "doors_acacia_trapdoor.png",
	tile_front = "doors_acacia_trapdoor.png",
	tile_side = "doors_acacia_trapdoor_side.png",
        groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1},
	gain_open = 0.06,
	gain_close = 0.13,
	-- protected = true,

})

doors.register("acacia_door", {
    tiles = {{ name = "doors_door_acacia.png", backface_culling = true }},
    description = "Acacia Door",
    inventory_image = "doors_item_acacia.png",
    groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
    gain_open = 0.06,
    gain_close = 0.13,
    -- protected = true,   
})

-- JUNGLE
doors.register_trapdoor("btmt:jungle_trapdoor", {
	description = "Jungle Trapdoor",
	inventory_image = "doors_jungle_trapdoor.png",
	wield_image = "doors_jungle_trapdoor.png",
	tile_front = "doors_jungle_trapdoor.png",
	tile_side = "doors_jungle_trapdoor_side.png",
        groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1},
	gain_open = 0.06,
	gain_close = 0.13,
	-- protected = true,

})

doors.register("jungle_door", {
    tiles = {{ name = "doors_door_jungle.png", backface_culling = true }},
    description = "Jungle Door",
    inventory_image = "doors_jungle_item_wood.png",
    groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
    gain_open = 0.06,
    gain_close = 0.13,
    -- protected = true,	
})

-- PINE
doors.register_trapdoor("btmt:pine_trapdoor", {
	description = "Pine Trapdoor",
	inventory_image = "pine_trapdoor.png",
	wield_image = "pine_trapdoor.png",
	tile_front = "pine_trapdoor.png",
	tile_side = "pine_trapdoor.png",
        groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1},
	gain_open = 0.06,
	gain_close = 0.13,
	-- protected = true,

})

doors.register("pine_door", {
    tiles = {{ name = "doors_pine_door.png", backface_culling = true }},
    description = "Pine Door",
    inventory_image = "doors_item_pine.png",
    groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
    gain_open = 0.06,
    gain_close = 0.13,
    -- protected = true,	
})

-- ASPEN
doors.register_trapdoor("btmt:aspen_trapdoor", {
	description = "Aspen Trapdoor",
	inventory_image = "aspen_trapdoor.png",
	wield_image = "aspen_trapdoor.png",
	tile_front = "aspen_trapdoor.png",
	tile_side = "aspen_trapdoor.png",
        groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1},
	gain_open = 0.06,
	gain_close = 0.13,
	-- protected = true,

})

doors.register("aspen_doors", {
    tiles = {{ name = "doors_door_aspen.png", backface_culling = true }},
    description = "Aspen Door",
    inventory_image = "doors_item_aspen.png",
    groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
    gain_open = 0.06,
    gain_close = 0.13,
    -- protected = true,	
})

--- RECIPES : ===========================================================================
-- WOODEN :
minetest.clear_craft({
    output = "doors:door_wood"
})

minetest.register_craft({
    output = "doors:door_wood",
    recipe = {
        {"default:wood", "default:wood"},
        {"default:wood", "default:wood"},
        {"default:wood", "default:wood"},
    }
})

-- ACACIA ---------------------------------------------------------
minetest.register_craft({
    output = "doors:acacia_door",
    recipe = {
        {"default:acacia_wood", "default:acacia_wood"},
        {"default:acacia_wood", "default:acacia_wood"},
        {"default:acacia_wood", "default:acacia_wood"},
    }
})

minetest.register_craft({
    output = "btmt:acacia_trapdoor 2",
    recipe = {
        {"default:acacia_wood", "default:acacia_wood", "default:acacia_wood"},
        {"default:acacia_wood", "default:acacia_wood", "default:acacia_wood"},
    }
})

-- JUNGLE ---------------------------------------------------------
minetest.register_craft({
    output = "doors:jungle_door",
    recipe = {
        {"default:junglewood", "default:junglewood"},
        {"default:junglewood", "default:junglewood"},
        {"default:junglewood", "default:junglewood"},
    }
})

minetest.register_craft({
    output = "btmt:jungle_trapdoor 2",
    recipe = {
        {"default:junglewood", "default:junglewood", "default:junglewood"},
        {"default:junglewood", "default:junglewood", "default:junglewood"},
    }
})

-- PINE -----------------------------------------------------------
minetest.register_craft({
    output = "doors:pine_door",
    recipe = {
        {"default:pine_wood", "default:pine_wood"},
        {"default:pine_wood", "default:pine_wood"},
        {"default:pine_wood", "default:pine_wood"},
    }
})

minetest.register_craft({
    output = "btmt:pine_trapdoor 2",
    recipe = {
        {"default:pine_wood", "default:pine_wood", "default:pine_wood"},
        {"default:pine_wood", "default:pine_wood", "default:pine_wood"},
    }
})

-- ASPEN ----------------------------------------------------------
minetest.register_craft({
    output = "doors:aspen_doors",
    recipe = {
        {"default:aspen_wood", "default:aspen_wood"},
        {"default:aspen_wood", "default:aspen_wood"},
        {"default:aspen_wood", "default:aspen_wood"},
    }
})

minetest.register_craft({
    output = "btmt:aspen_trapdoor 2",
    recipe = {
        {"default:aspen_wood", "default:aspen_wood", "default:aspen_wood"},
        {"default:aspen_wood", "default:aspen_wood", "default:aspen_wood"},
    }
})

end
