# 💰 Custom Loot Editor

## Mob Loot Editor <a href="#user-content--mob-loot-editor" id="user-content--mob-loot-editor"></a>

**VortexStacker** features a professional, GUI-driven loot editor that allows you to manage custom drops for every mob on your server. Forget about complex YAML files; you can set up everything—from rare custom equipment to nested loot tables, directly in-game.

### Getting Started <a href="#user-content-getting-started" id="user-content-getting-started"></a>

To open the editor, use the command:

> **`/stacker loot [type]`** *(Requires Administrative Permissions)*

#### **1. The Item Importer** <a href="#user-content-1-the-item-importer" id="user-content-1-the-item-importer"></a>

One of the most powerful features of the editor is the **Direct Importer**.

* **How it works:** When you are inside a Mob's loot table menu, simply **click any item in your  inventory**.
* **What it saves:** The editor captures **EVERYTHING**. This includes:
  * Custom Names & Lore
  * Custom item models
  * Enchantments (even above vanilla limits)
  * NBT Data (CustomModelData, persistent tags)
  * Attributes & Flags
  * Potion effects or Firework patterns

### 2. Advanced Conditions

#### **Core Conditions** <a href="#user-content-core-conditions" id="user-content-core-conditions"></a>

These apply to almost any mob and control basic drop logic.

| Condition                   | Description                                                             |
| --------------------------- | ----------------------------------------------------------------------- |
| **`IS_ADULT`**              | The entity must be an adult.                                            |
| **`IS_BABY`**               | The entity must be a baby.                                              |
| **`REQUIRE_PLAYER_KILL`**   | The final blow must be from a player (Prevents AFK farm drops).         |
| **`REQUIRE_PLAYER_DAMAGE`** | A player must have dealt damage to the entity recently.                 |
| **`REQUIRE_LOOTING`**       | Requires the killer to have the Looting enchantment (any level).        |
| **`PER_STACK_SCALING`**     | Multiplies the drop amount by the current stack size of the mob.        |
| **`MIN_STACK_SIZE`**        | The mob stack must be at least a certain size for this item to drop.    |
| **`ON_FIRE`**               | The entity must be on fire when it dies.                                |
| **`SMELTED_LOOT`**          | Drops the "cooked" version of items (triggered by fire or Fire Aspect). |
| **`KILLED_BY_FIRE_ASPECT`** | Specifically requires a weapon with the Fire Aspect enchantment.        |

***

#### **Mob-Specific Conditions** <a href="#user-content-mob-specific-conditions" id="user-content-mob-specific-conditions"></a>

These only appear in the GUI when they are relevant to the mob you are editing.

| Condition                      | Relevant Mobs                | Description                                                       |
| ------------------------------ | ---------------------------- | ----------------------------------------------------------------- |
| **`SKELETON_SHOT`**            | Creepers                     | Traditionally used for Music Disc drops.                          |
| **`CHARGED_CREEPER`**          | Mob Heads                    | Required for Creepers/Zombies/Skeletons to drop their heads.      |
| **`KILLED_BY_FROG`**           | Slimes / Magma Cubes         | Required for Froglight drops.                                     |
| **`FROG_WARM/COLD/TEMPERATE`** | Slimes / Magma Cubes         | Determines which specific color of Froglight drops.               |
| **`RAID_CAPTAIN`**             | Pillagers, Evokers, etc.     | Required for the Ominous Banner drop.                             |
| **`SHEEP_COLOR`**              | Sheep                        | Drops loot based on the wool color of the sheep.                  |
| **`VILLAGER_TYPE / PROF.`**    | Villagers / Zombie Villagers | Differentiates drops based on biome type or job.                  |
| **`CAT_TYPE`**                 | Cats                         | Differentiates drops based on the cat's skin.                     |
| **`MOOSHROOM_VARIANT`**        | Mooshrooms                   | Checks if it is a Red or Brown Mooshroom.                         |
| **`PANDA_VARIANT`**            | Pandas                       | Checks for specific personality types (Lazy, Weak, Worried, etc). |

***

#### **Technical & Advanced Conditions** <a href="#user-content-technical--advanced-conditions" id="user-content-technical--advanced-conditions"></a>

Used for deep integration or custom mechanics.

| Condition             | Description                                                                    |
| --------------------- | ------------------------------------------------------------------------------ |
| **`PERSISTENT_DATA`** | Allows checking for custom PDC tags (e.g., tags from MythicMobs or EliteMobs). |
| **`SPAWN_REASON`**    | Check if the mob was spawned by a Spawner, Natural spawn, or Egg.              |

#### **3. Sub-Table Logic (Nested Loot)** <a href="#user-content-3-sub-table-logic-nested-loot" id="user-content-3-sub-table-logic-nested-loot"></a>

You can create **Child Loot Tables**! This allows you to create "Drop Groups."

* *Example:* Create a "Rare Treasure" table. Add it as a child to multiple mobs. If the "Rare Treasure" roll succeeds, it then rolls from its own list of items.

***

### 📽️ Visual Showcase <a href="#user-content-visual-showcase" id="user-content-visual-showcase"></a>

*(Note: Gifs here)*

#### **The Main Menu** <a href="#user-content-the-main-menu" id="user-content-the-main-menu"></a>

Easy navigation through all spawnable mobs with real-time loot entry counters.

> `[GIF: Navigating the Mob List]`

#### **Importing an Item** <a href="#user-content-importing-an-item" id="user-content-importing-an-item"></a>

Just one click to move a complex item from your hand into the mob's pool.

> `[GIF: Clicking a Diamond Sword in inventory to import it]`

#### **Configuring Conditions** <a href="#user-content-configuring-conditions" id="user-content-configuring-conditions"></a>

Deep-dive into an item's settings to set chances, scaling, and kill requirements.

> `[GIF: Toggling 'Adult Only' and 'Per-Stack Scaling']`

***

#### **Technical Summary for Admins** <a href="#user-content-technical-summary-for-admins" id="user-content-technical-summary-for-admins"></a>

* **Vanilla Importer:** Imports vanilla lootable automatically for missing mobs for the current version!
* **Storage:** Loot is saved in `plugins/VortexStacker/LootTables/`. Each mob gets its own file for easy backup.
* **Performance:** All loot calculations are handled asynchronously where possible to ensure zero TPS impact during heavy combat.
* **Infinite Chances:** Supports decimal chances (e.g., `0.0001%` for ultra-rare drops).
