Interface ProjectileSource

    • Method Detail

      • launchProjectile

        <T extends ProjectileOptional<T> launchProjectile​(EntityType<T> projectileType)
        Launches a Projectile from this projectile source.
        Type Parameters:
        T - The Type of Projectile
        Parameters:
        projectileType - The type of the projectile
        Returns:
        The projectile instance if it was launched, or absent
      • launchProjectile

        default <T extends ProjectileOptional<T> launchProjectile​(Supplier<EntityType<T>> projectileType)
        Launches a Projectile from this projectile source.
        Type Parameters:
        T - The Type of Projectile
        Parameters:
        projectileType - The type of the projectile
        Returns:
        The projectile instance if it was launched, or absent
      • launchProjectile

        <T extends ProjectileOptional<T> launchProjectile​(EntityType<T> projectileType,
                                                            Vector3d velocity)
        Launches a Projectile from this projectile source.
        Type Parameters:
        T - The Type of Projectile
        Parameters:
        projectileType - The type of the projectile
        velocity - The velocity to launch the projectile
        Returns:
        The projectile instance if it was launched, or absent
      • launchProjectile

        default <T extends ProjectileOptional<T> launchProjectile​(Supplier<EntityType<T>> projectileType,
                                                                    Vector3d velocity)
        Launches a Projectile from this projectile source.
        Type Parameters:
        T - The Type of Projectile
        Parameters:
        projectileType - The type of the projectile
        velocity - The velocity to launch the projectile
        Returns:
        The projectile instance if it was launched, or absent
      • launchProjectileTo

        <T extends ProjectileOptional<T> launchProjectileTo​(EntityType<T> projectileType,
                                                              Entity target)
        Launches a new Projectile from this projectile source.
        Type Parameters:
        T - The Type of Projectile
        Parameters:
        projectileType - The type of the projectile
        target - the target to launch the projectile at
        Returns:
        the projectile if successfully launched, Optional.empty() otherwise
      • launchProjectileTo

        default <T extends ProjectileOptional<T> launchProjectileTo​(Supplier<EntityType<T>> projectileType,
                                                                      Entity target)
        Launches a new Projectile from this projectile source.
        Type Parameters:
        T - The Type of Projectile
        Parameters:
        projectileType - The type of the projectile
        target - the target to launch the projectile at
        Returns:
        the projectile if successfully launched, Optional.empty() otherwise