The EntityProjectileComponent class in @minecraft/server.
Class in @minecraft/server
Extends EntityComponent
import { EntityProjectileComponent } from '@minecraft/server';Constructor
Section titled “Constructor”protected constructor();Properties
Section titled “Properties”airInertia
Section titled “airInertia”airInertia: number;catchFireOnHurt
Section titled “catchFireOnHurt”catchFireOnHurt: boolean;critParticlesOnProjectileHurt
Section titled “critParticlesOnProjectileHurt”critParticlesOnProjectileHurt: boolean;destroyOnProjectileHurt
Section titled “destroyOnProjectileHurt”destroyOnProjectileHurt: boolean;gravity
Section titled “gravity”gravity: number;hitEntitySound
Section titled “hitEntitySound”optional
hitEntitySound?: string;hitGroundSound
Section titled “hitGroundSound”optional
hitGroundSound?: string;hitParticle
Section titled “hitParticle”optional
hitParticle?: string;lightningStrikeOnHit
Section titled “lightningStrikeOnHit”lightningStrikeOnHit: boolean;liquidInertia
Section titled “liquidInertia”liquidInertia: number;onFireTime
Section titled “onFireTime”onFireTime: number;optional
owner?: Entity;Types
shouldBounceOnHit
Section titled “shouldBounceOnHit”shouldBounceOnHit: boolean;stopOnHit
Section titled “stopOnHit”stopOnHit: boolean;componentId
Section titled “componentId”static read-only
static readonly componentId = 'minecraft:projectile';Methods
Section titled “Methods”shoot(velocity: Vector3, options?: ProjectileShootOptions): void;Parameters
velocityVector3optionsoptionalProjectileShootOptions