Link Search Menu Expand Document

Egg Drops in loot tables

Table of contents
  1. Egg Drops in loot tables
    1. Add loot table to BP entity
    2. Create the loot table

Here is how to make entities drop their own eggs when killed:

Add loot table to BP entity

"minecraft:loot": {
    "table": "loot_tables/entities/your_entity.json"
},

Create the loot table

{
    "pools": [
        {
            "rolls": 1,
            "entries": [
                {
                    "type": "item",
                    "name": "minecraft:spawn_egg",
                    "weight": 1,
                    "functions": [
                        {
                            "function": "set_actor_id",
                            "id": "namespace:your_entity" // View notes below
                        }
                    ]
                }
            ]
        }
    ]
}

Notes: Change this to match your entity, or remove it to automatically use the ID of the entity that drops this loot table.