blob: 0d02de40f1766631b23365d84edaf868fd542f7e (
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
|
package common.reactorItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public abstract class AbstractReactorItem extends Item {
private final int[] behaviourID;
protected AbstractReactorItem(int... behaviourID) {
this.behaviourID = behaviourID;
}
@Override
public abstract double getDurabilityForDisplay(ItemStack stack);
@Override
public abstract boolean showDurabilityBar(ItemStack stack);
@Override
public final String getUnlocalizedName(ItemStack stack) {
return super.hasSubtypes
? (super.getUnlocalizedName() + "." + stack.getItemDamage())
: super.getUnlocalizedName();
}
public final int getBehaviourID(int meta) {
return behaviourID[meta];
}
}
|