blob: 876d8b4811aca3b1801d04619573f55d66865ff9 (
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 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];
}
}
|