> For the complete documentation index, see [llms.txt](https://wiki.mypet-plugin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.mypet-plugin.com/setup-guide/skilltree-creation/creating-custom-skilltrees/skills/sniff.md).

# Sniff

Let your Pet sniff out and dig up an item over time.

The Sniff skill makes your Pet periodically "sniff out" an item from its **drop pool** — it plays a short sniffer digging animation and then drops that item beside itself. The Pet only sniffs while it has all paws on solid ground, pausing while it is swimming in deep water or in the air.

The drop pool is configured **per skilltree** — each level of the Sniff skill can add its own entries. When it's time to sniff, the Pet rolls a weighted random pick across every entry granted so far and drops a random amount of that item.

### Settings <a href="#settings" id="settings"></a>

| Setting  | Key        | Type    | Meaning                                                                 |
| -------- | ---------- | ------- | ----------------------------------------------------------------------- |
| Interval | `interval` | integer | Seconds between each dig/drop.                                          |
| Drops    | `drops`    | list    | The items this level adds to the drop pool — each an entry (see below). |

Each entry in `drops` has four fields:

| Field       | Type    | Meaning                                                                                                                                                                  |
| ----------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `item`      | item    | The item to drop — a material name (`SHEARS`), a `minecraft:…` item/data-component string, or a `. minecraft:…[…]` string copied from `/petadmin info item` (see below). |
| `weight`    | integer | Relative odds of this entry being picked, ≥1. Equal weights across entries mean a uniform random pick.                                                                   |
| `amountMin` | integer | Minimum stack size dropped, ≥1.                                                                                                                                          |
| `amountMax` | integer | Maximum stack size dropped, ≥ `amountMin`.                                                                                                                               |

Drop entries are cumulative: an entry added at one level stays in the pool at every level above it.

### Capturing an exact item <a href="#capture" id="capture"></a>

To grant an item with a custom name, lore, or enchantments, hold it in your main hand and run [`/petadmin info item`](https://github.com/MyPetORG/MyPet-Wiki/tree/4.0/player-guide/commands/admin-commands.md#petadmin) — click the **\[Copy with NBT]** button on the output to copy the item's full component string (e.g. `. minecraft:shears[minecraft:damage=6]`) to your clipboard, then paste it as the `item` value.

The other button, **\[Copy]**, gives just the material name (`SHEARS`). Use that one when any item of that type will do; use **\[Copy with NBT]** when the drop has to carry its exact name, lore, enchantments, or damage.

```json
"Sniff": {
  "Upgrades": {
    "1": {
      "interval": 60,
      "drops": [
        { "item": "minecraft:wheat",   "weight": 10, "amountMin": 1, "amountMax": 3 },
        { "item": "minecraft:diamond", "weight": 3,  "amountMin": 1, "amountMax": 1 }
      ]
    }
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://wiki.mypet-plugin.com/setup-guide/skilltree-creation/creating-custom-skilltrees/skills/sniff.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
