---
description: A component corresponds to a generator or a machine, and is always a block.
---

# How components works

## Component variants

Every component have its own yml file, in the `/components` directory. To create a variant of a component, copy the current yml schema, and change the header to a new unique id.

## Items associated with components

To connect a component to a item, create a new item in the `items/component_items.yml` file, with the default item values, and with the `componetId` key.

_Note that certain components only supports a certain type of blocks._

## Component configuration

Components that's generates energy will have the `supplied-energy`  key, which says how much energy the component should supply the network.

For machines, are the `max-energy-consumption` key common. It says how much energy the component will consume.

## Info diagram

To make it clearer to distinguish the components, diagrams are used to show their names, as well as their supplied/consumed energy.

```yaml
info:
  title: "<red> My Component Title" # The name of the component, leave empty if none.
  display-energy: true # Shows supplied/consumed energy, some components may not use the value.
```

## Component List

<table><thead><tr><th width="181.19989013671875">Name</th><th>Function</th></tr></thead><tbody><tr><td>BlockBreaker</td><td>Breaks the block it looking at. If it does not have enough energy, will the blocks breaking duration be extended. Each material can have unique breaking duration.</td></tr><tr><td>BlockPlacer</td><td>Places the block from its inventory. If it does not have enough energy, no blocks will be placed.</td></tr><tr><td>TreeCutter</td><td>Cutes the tree it looking at. If it does not have enough energy, will the cutting interval be extended.</td></tr><tr><td>Milker</td><td>Milks entities that can be milked. If it does not have enough energy, will the milking interval be extended.</td></tr><tr><td>Relay</td><td>Can be used to create a wire connectable block, does not supply/consume energy. </td></tr><tr><td>FuelBurner</td><td>Generates energy, from specified materials.</td></tr><tr><td>SolarPanel</td><td>Generates energy, only during the day.</td></tr></tbody></table>
