Egg Drops

beginner

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

Add loot table to BP entity

Copy
"minecraft:loot": {
    "table": "loot_tables/entities/your_entity.json"
},
1
2
3

Create the loot table

Copy
{
	"pools": [
		{
			"rolls": 1,
			"entries": [
				{
					"type": "item",
					"name": "minecraft:spawn_egg",
					"weight": 1,
					"functions": [
						{
							"function": "set_actor_id",
							"id": "namespace:your_entity" // View notes below
						}
					]
				}
			]
		}
	]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

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

Contributors