1. Wiki
  2. /Entities
  3. /minecraft:shooter

minecraft:shooter

Don't want to write this by hand? GodCraft sets minecraft:shooter for you with a switch.Get GodCraft

Overview

minecraft:shooter is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Sets which projectile the entity fires with its ranged attack. The ranged attack behavior reads this to know what to shoot.

Fields

FieldTypeDefaultDescription
aux_valInteger"-1"Potion effect ID put on the default projectile.
defStringnoneEntity used as the default projectile; it needs the projectile component.
magicBoolean"false"If true, the attack counts as magic and won't run together with other magic behaviors like drinking potions.
powerDecimal"0.00"Launch speed of the projectile; 0 uses the projectile's own default.
projectilesListnoneProjectiles to choose from, checked in order; the first one whose filter passes is used.
soundStringnoneSound played when the entity shoots.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:shooter": {
    "aux_val": "-1",
    "def": "",
    "magic": "false",
    "power": "0.00",
    "projectiles": {},
    "sound": ""
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more