> For the complete documentation index, see [llms.txt](https://mobs.advancedplugins.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mobs.advancedplugins.net/advancedmobs/mechanics/mob-loot.md).

# Mob Loot

Custom mobs are able to drop extremely configurable loot using mob loot mechanic.

### How to disable loot for a mob?

Go into `plugins/AdvancedMobs/drops` folder and find the file name which matches mob's name. Simply **delete the file** and restart!

### How to configure mob loot?

In the `drops` folder, you can find all the loot configured for each mob. Find the mob you want to edit (in our case, we'll edit Gorilla's drops).

{% code title="drops/Gorilla.yml" overflow="wrap" lineNumbers="true" %}

```yaml
# Drops Configuration
#  Command drops are supported! Set `command: 'your command here'`, %player% placeholder is supported as a player name

# Is Looting (Vanilla Enchant) enabled for this mob's drops?
lootingEnabled: true

# How much exp should the mob drop?
exp: 1-3

# This only works for Vanilla mobs, decides whether vanilla drops should be disabled or not
disableVanillaDrops: true

drops:
  0:
    chance: 45
    type: IRON_INGOT
    amount: 1-2
    # List all levels which should have this drop
    forLevels: 0-19
  1:
    chance: 10
    type: IRON_INGOT
    amount: 1-2
    # Only upgraded spawners will have a chance to get this drop
    forLevels: 1-19
```

{% endcode %}

You can choose whether looting enchantment works with custom mobs, how much experience they drop or if editing vanilla mob's loot, whether vanilla drops work with mobs as well.

Now, onto editing the custom drops. Two loot types are possible: **items** and **commands**

#### Items

You need to follow this item format: <https://wiki.advancedplugins.net/configuration/config-items>

For mob to drop loot, you also need to specify for which upgradeLevels this loot will drop. With Gorilla, we can see that the first drop will work on all levels (**forLevels** setting), from **default (0)** all up to 19th level (that is the maximum by default).

#### Commands

To set a command drop, it's as simple as setting item's drop. Be aware, that this loot will not drop but rather execute upon a mob is killed.

Example configuration for commands:

{% code title="drops/Gorilla.yml" overflow="wrap" lineNumbers="true" %}

```yaml
 1:
    chance: 10
    command: 'broadcast %player% killed a Gorilla!'
    forLevels: 0-19
```

{% endcode %}

This will execute a command when Gorilla is killed, broadcasting `<killer's name> killed a Gorilla!`

**%player%** - will be replaced with player's who killed, name.


---

# 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://mobs.advancedplugins.net/advancedmobs/mechanics/mob-loot.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.
