Game Event Listener

Power Type

Executes an action upon listening to a game event or vibration.

Type ID: origins:game_event_listener

Note

In the context of this power type, the 'actor' entity is the entity that emmited the game event or vibration while the 'target' entity is the entity that has the power.

Note

See Minecraft Wiki: Sculk Sensor (Vibration amplitudes) for a list of vanilla game events you can check for.

Fields

Field Type Default Description
trigger_order String "unspecified" Determines whether the power type should prioritize game events by distance ("by_distance") or arbitrarily ("unspecified").
entity Boolean true Determines whether the power type should listen to game events emitted by entities.
block Boolean true Determines whether the power type should listen to game events emitted by blocks.
bientity_action Bi-entity Action Type optional If specified, this action will be executed on either or both the 'actor' and 'target' entities.
bientity_condition Bi-entity Condition Type optional If specified, the specified actions will only be executed if this condition is fulfilled by either or both 'actor' and 'target' entities.
block_action Block Action Type optional If specified, this block action type will be executed at the position where the game event or vibration was emitted.
block_condition Block Condition Type optional If specified, only executes the actions if the game event or vibration is emitted by a block that fulfills the block condition.
cooldown Integer 1 Interval of ticks this power needs to recharge before being able to listen to game events or vibrations again.
hud_render Hud Render {"should_render": false} Determines how the cooldown of this power is visualized on the HUD.
event Identifier optional If specified, will make the power only listen for the game events with this namespace and IDs.
events Array of Identifiers optional If specified, will make the power only listen for the game events with these namespace and IDs.
event_tag Identifier optional If specified, will make the power only listen for the game events inside game event tag.
show_particle Boolean true Determines whether the vibration should emit a particle effect.

Examples

{
    "type": "origins:game_event_listener",
    "bientity_action": {
        "type": "origins:target_action",
        "action": {
            "type": "origins:set_on_fire",
            "duration": 5
        }
    },
    "event": "minecraft:hit_ground"
}

This example will set the entity with the power on fire every time the hit_ground game event is emmited.