> For the complete documentation index, see [llms.txt](https://frinn.gitbook.io/custom-machinery-1.21/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://frinn.gitbook.io/custom-machinery-1.21/recipes/requirements/drop.md).

# Drop

Make the recipe drop or consume item on ground

Drop requirement is used to check/consume/drop items on ground near the machine.

This requirement is available in both `input` and `output` modes.

The requirement type of drop requirement is : `"custommachinery:drop"`.

### Properties

The drop requirement has 3 mandatory properties and 6 optional properties.

#### Mandatory properties

```json
"type": "custommachinery:drop" //Mandatory to define a drop requirement.
```

<details>

<summary>Mode</summary>

#### Name : `mode`

#### Description :

Define when the requirement will be processed.

* `input` The requirement will be processed at the start of the crafting process.
* `output` The requirement will be processed at the end of the crafting process.

#### Example :

```json
"mode": "input"
```

The requirement will be processed at the start of the crafting process.

</details>

<details>

<summary>Action</summary>

#### Name : `action`

#### Description :

Define what will the requirement do. Available actions are:

* `check` Will only check for items that match the list defined in the `input` property.
* `consume` Will consume items that match the list defined in the `input` property.
* `produce` Will drop the item specified in the `output` property near the machine.

`check` will check for the required items each tick of the recipe and stop the processing if it can't find the items.

`consume` and `produce` will do their actions on start of the processing if the `mode` property is "input" or on end of the processing if "output".

#### Example :

```json
"action": "consume"
```

The machine will consume items on ground.

</details>

#### Optional properties

<details>

<summary>Output</summary>

#### Name : `output`

#### Description :

An item to drop if the `action` property is set to `produce`

#### Default :

```json
"output": "minecraft:air"
```

An air item, meaning nothing will be dropped.

#### Example :

```json
"output": "minecraft:diamond"
```

The requirement will drop a vanilla diamond on ground.

#### Note :

This property is optional for `check` and `consume` actions, but mandatory for `produce` action.

</details>

<details>

<summary>Input</summary>

#### Name : `input`

#### Description :

An ingredient with one of the following syntax :&#x20;

* For items

```json
"input": {
    "item": "item_id"
}
```

"item\_id" is the registry name of the item you want to be consumed by the recipe.

It must be specified like `namespace:item_registry_name` with "namespace" being either "minecraft" if the item is from vanilla or a mod ID if the item is from a mod (ex : `minecraft:diamond` or `mekanism:copper_ingot`).

* For tags

```json
"input": {
    "tag": "tag_id"
}
```

"tag\_id" is a tag grouping any item that can be consumed by the recipe.

#### Default : `empty`

The machine will not be able to check or consume any items.

#### Example :

```json
"input": {
    "item": "minecraft:cobblestone"
}
```

The machine will check or consume only vanilla cobblestone or items in the #forge:stone tag.

</details>

<details>

<summary>Whitelist</summary>

#### Name : `whitelist`

#### Description :

A boolean, if false the `input` property list will be used as a blacklist of items instead of a whitelist.

#### Default : `true`

The `input` property will act as a whitelist.

#### Example :

```json
"whitelist": false
```

The `input` property will act as a blacklist.

</details>

<details>

<summary>Amount</summary>

#### Name : `amount`

#### Description :

The amount of items to check/consume or produce.

#### Default : 1

The requirement will check, consume or produce 1 item.

#### Example :

```json
"amount": 9
```

The recipe will check/consume 9 items matching the list defined in the `input` property (if whitelist), the crafting process will be stopped if the required amount of items are not found.\
If `action` property is `produce` this property defines the amount of items produced.

</details>

<details>

<summary>Radius</summary>

#### Name : `radius`

#### Description :

An integer defining the maximal range from the center of the machine that the items will be searched. This does not affect produced items.

#### Default : 1

1 block radius, in a sphere shape around the center of the machine.

#### Example :

```json
"radius": 3
```

The radius is set to 3 blocks around the machine.

</details>

<details>

<summary>Delay</summary>

#### Name : `delay`

#### Description :

A double value, between 0.0 and 1.0 that represents at which time of the recipe the requirement action must be executed.\
A delay of 0.5 represent half of the recipe, 0.25 a quarter etc...

#### Default : 0

The requirement action will be executed on start if mode is input or on end if mode is output.

#### Example :

```json
"delay": 0.33
```

The requirement action will be executed when the recipe progress time is at (approximatively) a third of the recipe total duration.

#### Note :

If delay is specified the requirement will be only executed at the specified delay, independently of the mode property.\
This property have no effect if the `action` is set to `check` as this action is executed each tick of the recipe.

</details>

<details>

<summary>Chance</summary>

#### Name : `chance`

#### Description :

A double between 0.0 and 1.0 that define the chance of the requirement to be processed.

#### Default : 1

The requirement will always be processed.

#### Example :

```json
"chance": 0.7
```

The requirement will have 70% chance to be processed.

</details>

### Example

A Drop Requirement that will make the recipe drop 3 diamonds on the ground at the end of the crafting process with a 33% chance.

```json
{
    "type": "custommachinery:drop",
    "mode": "output",
    "action": "produce",
    "output": "minecraft:diamond",
    "chance": 0.33
}
```

A drop requirement that will make the recipe check for 5 items in the `#forge:stone` tag in a 5 blocks radius during all the crafting process.

```json
{
    "type": "custommachinery:drop",
    "mode": "input",
    "action": "check",
    "input": {
        "tag": "forge:stone"
    },
    "amount": 5,
    "radius": 5
}
```
