function register_fence(base_id, id, name, image, groups, sounds)
	if base_id then
		minetest.register_craft({
			output = id .. " 6",
			recipe = {
				{base_id, base_id, base_id},
				{base_id, base_id, base_id},
			}
		})
	end
	minetest.register_node(id, {
		description = name,
		drawtype = "fencelike",
		tiles = { image },

		node_box = {
			type = "fixed",
			fixed = {0.2, 1.5, 0.2, -0.2, 0, -0.2},
		},

		selection_box = { type = "regular" },
		paramtype = "light",
		groups = groups,
		sounds = sounds,
	})
end

register_fence("default:wood", "fences:wood", "Wooden fence", "wood.png", { wood = 3 }, default.node_sound.wood)
