> 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/mod-integrations/kubejs/recipes/drop.md).

# Drop

Use the drop requirement in a KubeJS recipe

**Use one of these methods to add a** [**Drop Requirement**](https://github.com/Frinn38/Custom-Machinery/wiki/Drop-Requirement) **to the recipe.**

```javascript
//Check for a specific item.
.checkDrop(item, amount, radius)
//Check for any item.
.checkAnyDrop(amount, radius)
//Check for a list of items.
.checkDrops(ingredient, radius)
.checkDrops(ingredient, radius, whitelist)

.consumeDropOnStart(item, amount, radius)
.consumeAnyDropOnStart(amount, radius)
.consumeDropsOnStart(ingredient, radius)
.consumeDropsOnStart(ingredient, radius, whitelist)

.consumeDropOnEnd(item, amount, radius)
.consumeAnyDropOnEnd(amount, radius)
.consumeDropsOnEnd(ingredient, radius)
.consumeDropsOnEnd(ingredient, radius, whitelist)

.dropItemOnStart(item)
.dropItemOnEnd(item)
```

* The `item` param must be an ItemStack created using one of the following syntax:&#x20;
  * String syntax : `"diamond"` or `"botania:pure_daisy"` or `"4x mekanism:osmium_ingot"`
  * &#x20;`Item.of()` KubeJS method : `Item.of("minecraft:diamond", 42)`
* The `amount` param must be a positive integer, it represents the amount of items checked/consumed.
* The `radius` param must be a positive integer, it represents the maximum distance to the machine the items will be searched.
* The `ingredient` param must be a SizedIngredient.\
  KubeJS support various ingredient types : "item\_id", "#tag\_id", "@mod\_id" or even regex.
* The `whitelist` param must be a boolean, if set to `false` the filter will be a blacklist instead of a whitelist.

### Example

The recipe will consume 10 stones dropped in a 10 blocks radius of the machine.

```javascript
ServerEvents.recipes(event => {

  event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
  .consumeDropsOnStart("10x #c:stones", 10)
  
})
```
