Skip to content

Shoot Entity

Summons an entity and applies the specified velocity to it, as if the entity is a thrown projectile.

Type ID: kaya:shoot_entity

Format

Field Type Default Description
entity_type Identifier The ID of the entity to summon.
tag NBT Provider optional If specified, this NBT will be applied to the entity after it was summoned.
position Vec3 Provider The position of where the entity will be summoned.
direction Vec3 Provider The direction of the velocity that will be applied to the summoned entity.
velocity Float Provider 1.0 The velocity to apply to the summoned entity.
inaccuracy Float Provider 1.0 The factor used for randomizing the direction of the velocity.
count Int Provider 1 The amount of entities to summon and apply velocity to.
shooter Entity Provider optional If specified and if the summoned entity is a projectile, this entity will be set as the owner of the projectile.

Example

{
    "type": "kaya:shoot_entity",
    "entity_type": "minecraft:small_fireball",
    "position": {
        "type": "kaya:entity/position",
        "entity": "this",
        "anchor": "eyes"
    },
    "direction": {
        "type": "kaya:entity/view",
        "enttiy": "this"
    }
}

This example will shoot out a small fireball relative at the eyes and towards the direction of where the entity provided by the kaya:this_entity context parameter is looking.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.