Entity Documentation - minecraft:entity_spawned

minecraft:entity_spawned triggers an event calls on an entity when the entity is spawned in the world.

Note

minecraft:entity_spawned is used to trigger events when the entity is spawned in the world. For events to trigger when the entity is born via breeding, see minecraft:entity_born

Example

"minecraft:entity_spawned":{
}

Vanilla entities examples

goat

"minecraft:entity_spawned": {
        "randomize": [
          {
            "weight": 95,
            "add": {
              "component_groups": [
                "goat_adult"
              ]
            }
          },
          {
            "weight": 5,
            "add": {
              "component_groups": [
                "goat_baby"
              ]
            }
          }
        ]
      }

command_block_minecart

"minecraft:entity_spawned": {
        "add": {
          "component_groups": [
            "minecraft:command_block_inactive"
          ]
        }
      }

Vanilla entities using minecraft:entity_spawned