Fire Projectile

Power Type

Fires one or more projectiles upon pressing the specified Key.

Type ID: origins:fire_projectile

Fields

Field Type Default Description
entity_type Identifier The ID of the entity type that will be fired.
cooldown Integer 1 Interval of ticks this power needs to recharge before the power can be triggered again.
hud_render Hud Render optional Determines how the cooldown of this power is visualized on the HUD.
count Integer 1 The amount of projectiles to fire each use.
interval Integer 0 Determines the interval for firing multiple projectiles consecutively (in ticks). If set to 0, it will fire all the projectiles at the same tick.
start_delay Integer 0 Determines how long the start of the firing process is delayed (in ticks).
speed Float 1.5 The speed applied to the fired projectile.
divergence Float 1.0 How much each projectile fired is affected by random spread.
sound Identifier optional If set, the sound with this ID will be played when the power is used.
tag NBT optional NBT data of the entity.
key Key optional Which active key this power should respond to. If none is specified, this power will use the primary active power key (by default G).
projectile_action Entity Action Type optional If specified, this entity action will be executed on the projectile or entity that will be launched.
shooter_action Entity Action Type optional If specified, this entity action will be executed on the entity that has the power.

Examples

{
    "type": "origins:fire_projectile",
    "entity_type": "minecraft:arrow",
    "cooldown": 2,
    "hud_render": {
        "should_render": false
    },
    "tag": "{pickup:0b}",
    "key": {
        "key": "key.attack",
        "continuous": true
    }
}

This example will let the player fire arrows very rapidly by holding the left mouse button. They can't be picked up.

{
    "type": "origins:fire_projectile",
    "entity_type": "minecraft:snowball",
    "cooldown": 100,
    "hud_render": {
        "should_render": false
    },
    "count": 4,
    "interval": 5,
    "tag": "{Item: {id: 'minecraft:slime_ball', Count: 1b}}",
    "key": {
        "key": "key.use",
        "continuous": false
    }
}

This example will let the player fire 4 snow balls disguised as slime balls consecutively, with an interval of 5 ticks upon pressing the right mouse button.