Compatibility
Minecraft: Java Edition
1.21.x
Platforms
Data Pack
Supported environments
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
Licensed ARR
Published 3 weeks ago
Updated 4 weeks ago
Passengers from Spawn Eggs
This pack fixes the bug where spawn eggs do not allow mobs to spawn with passengers. To acheive this, the pack uses marker entities' data NBT component.
The tree of the data needed to be used looks like this:
id:"minecraft:marker",data:{spawnData:{id:"<namespaced_id: entity>",entity_data:<compound: entity data>}}
Here is an example for a spider jockey:
/give @p skeleton_spawn_egg[entity_data={id:"minecraft:marker",data:{spawnData:{id:"minecraft:spider",entity_data:{Passengers:[{id:"minecraft:skeleton",HandItems:[{id:"minecraft:bow"}]}],active_effects:[{id:"minecraft:strength",duration:-1}]}}}},item_name='"Spider Jockey Spawn Egg"'] 1
Or only with the required data NBT:
data:{spawnData:{id:"minecraft:spider",entity_data:{Passengers:[{id:"minecraft:skeleton",HandItems:[{id:"minecraft:bow"}]}],active_effects:[{id:"minecraft:strength",duration:-1}]}}}
[ i ] IMPORTANT [ i ]
These examples work successfully in 1.21 and 1.21.1 (1.21.x - so far), and will be updated if syntax to marker NBT does change.
Hope this data pack helps!