Skip to main content

on_projectile_spawned

Function on_projectile_spawned 

Source
pub(crate) fn on_projectile_spawned(
    world: &World,
    weapon: &mut ItemStack,
    projectile: &dyn Entity,
    owner: Option<&dyn Entity>,
)
Expand description

Mirrors vanilla EnchantmentHelper.onProjectileSpawned after the projectile has been handed to the world.