aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/interfaces/IProjectileItem.java
blob: 64782bf04c7d798f7218009756863b086e5d2e6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package gregtech.api.interfaces;

import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

import gregtech.api.enums.SubTag;

public interface IProjectileItem {

    /**
     * @return if this Item has an Arrow Entity
     */
    boolean hasProjectile(SubTag aProjectileType, ItemStack aStack);

    /**
     * @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend
     *         EntityArrow
     */
    EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ);

    /**
     * @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend
     *         EntityArrow
     */
    EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity,
        float aSpeed);
}