aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/interfaces/IItemBehaviour.java
blob: 9a513c2af5410ae67d3271819dd9ae9cda457974 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package gregtech.api.interfaces;

import gregtech.api.enums.SubTag;
import gregtech.api.items.GT_MetaBase_Item;
import java.util.List;
import net.minecraft.dispenser.IBlockSource;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

public interface IItemBehaviour<E extends Item> {
    boolean onLeftClickEntity(E aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity);

    boolean onItemUse(
            E aItem,
            ItemStack aStack,
            EntityPlayer aPlayer,
            World aWorld,
            int aX,
            int aY,
            int aZ,
            int aSide,
            float hitX,
            float hitY,
            float hitZ);

    boolean onItemUseFirst(
            E aItem,
            ItemStack aStack,
            EntityPlayer aPlayer,
            World aWorld,
            int aX,
            int aY,
            int aZ,
            int aSide,
            float hitX,
            float hitY,
            float hitZ);

    ItemStack onItemRightClick(E aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer);

    List<String> getAdditionalToolTips(E aItem, List<String> aList, ItemStack aStack);

    void onUpdate(E aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand);

    boolean isItemStackUsable(E aItem, ItemStack aStack);

    boolean canDispense(E aItem, IBlockSource aSource, ItemStack aStack);

    ItemStack onDispense(E aItem, IBlockSource aSource, ItemStack aStack);

    boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack);

    EntityArrow getProjectile(
            E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ);

    EntityArrow getProjectile(
            E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed);
}