mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-10-26 14:24:34 +00:00
ItemChisel: Set max damage field instead of overriding getMaxDamage(ItemStack) (#89)
This commit is contained in:
1 parent
7b9537571e
commit
2ae1f8ba93
1 file changed
+1
-6
@@ -51,6 +51,7 @@ public class ItemChisel extends Item implements IChiselItem {
|
||||
super();
|
||||
this.type = type;
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(Configurations.allowChiselDamage ? type.maxDamage : 0);
|
||||
setTextureName(
|
||||
Chisel.MOD_ID + ":chisel_"
|
||||
+ type.name()
|
||||
@@ -69,12 +70,6 @@ public class ItemChisel extends Item implements IChiselItem {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxDamage(ItemStack stack) {
|
||||
if (Configurations.allowChiselDamage) return type.maxDamage;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDamageable() {
|
||||
return Configurations.allowChiselDamage;
|
||||
|
||||
Reference in new issue
Block a user