Skip to content

Emit Game Event

Emits a game event at a position.

Type ID: kaya:emit_game_event

Format

Field Type Default Description
game_event Identifier The ID of the game event to emit.
position Vec3 Provider The position where to emit the game event.
entity_source Entity Provider optional If specified, this entity will be considered as the entity that emitted the game event.
block_source Block Provider optional If specified, this block will be considered as the block that emitted the game event.

Example

{
    "type": "kaya:emit_game_event",
    "game_event": "minecraft:projectile_land",
    "position": {
        "type": "kaya:block/position",
        "block": "used_block"
    },
    "entity_source": "this",
    "block_source": "used_block"
}

This example will emit a minecraft:projectile_land game event (which has a frequency of $2$) at the position of the block provided by the kaya:used_block context parameter, making the same block and the entity provided by the kaya:this_entity context parameter as the block and entity (respectively) that emitted the game event.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.