aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/items/GT_Tool_Item.java
blob: 78df3c91719e5239b576a0da952a6e4dc0e8216a (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
64
package gregtech.api.items;

import gregtech.api.util.GT_ModHandler;
import net.minecraft.item.ItemStack;

/**
 * This is just a basic Tool, which has normal durability and could break Blocks.
 */
public class GT_Tool_Item extends GT_Generic_Item {
    public GT_Tool_Item(
            String aUnlocalized,
            String aEnglish,
            String aTooltip,
            int aMaxDamage,
            int aEntityDamage,
            boolean aSwingIfUsed) {
        this(aUnlocalized, aEnglish, aTooltip, aMaxDamage, aEntityDamage, aSwingIfUsed, -1, -1);
    }

    public GT_Tool_Item(
            String aUnlocalized,
            String aEnglish,
            String aTooltip,
            int aMaxDamage,
            int aEntityDamage,
            boolean aSwingIfUsed,
            int aChargedGTID,
            int aDisChargedGTID) {
        this(
                aUnlocalized,
                aEnglish,
                aTooltip,
                aMaxDamage,
                aEntityDamage,
                aSwingIfUsed,
                aChargedGTID,
                aDisChargedGTID,
                0,
                0.0F);
    }

    public GT_Tool_Item(
            String aUnlocalized,
            String aEnglish,
            String aTooltip,
            int aMaxDamage,
            int aEntityDamage,
            boolean aSwingIfUsed,
            int aChargedGTID,
            int aDisChargedGTID,
            int aToolQuality,
            float aToolStrength) {
        super(
                aUnlocalized,
                aEnglish,
                aTooltip,
                aTooltip != null && !aTooltip.equals("Doesn't work as intended, this is a Bug"));
        setMaxDamage(aMaxDamage);
        setMaxStackSize(1);
        setNoRepair();
        setFull3D();
        GT_ModHandler.registerBoxableItemToToolBox(new ItemStack(this));
    }
}