# Drop

**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(filter, amount, radius)
.checkDrops(filter, amount, radius, whitelist)

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

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

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

* The `item` param must be an item created using `Item.of()`. \
  Example : `Item.of("minecraft:dirt")`
* 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 `filter` param must be an array of items. \
  Example : `[Item.of("minecraft:diamond"), Item.of("minecraft:cobblestone")]`. It represents a whitelist of items to search.
* The `whitelist` param must be a boolean, if set to `false` the filter will be a blacklist instead of a whitelist.

### Example

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

  event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
  .checkDrop(Item.of("minecraft:diamond"), 1, 10)
  
})
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://frinn.gitbook.io/custom-machinery-1.19/mod-integrations/kubejs/recipes/drop.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
