Give conjured items a blue timer (durability) bar

This commit is contained in:
Electroblob77
2020-10-22 23:50:49 +01:00
parent 1f4de65356
commit e530695f54
9 changed files with 48 additions and 0 deletions
@@ -1,6 +1,7 @@
package electroblob.wizardry.item;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.client.DrawingUtils;
import electroblob.wizardry.entity.projectile.EntityFlamecatcherArrow;
import electroblob.wizardry.registry.Spells;
import electroblob.wizardry.registry.WizardrySounds;
@@ -69,6 +70,11 @@ public class ItemFlamecatcher extends ItemBow implements IConjuredItem {
return this.getMaxDamageFromNBT(stack, Spells.flamecatcher);
}
@Override
public int getRGBDurabilityForDisplay(ItemStack stack){
return IConjuredItem.getTimerBarColour(stack);
}
@Override
// This method allows the code for the item's timer to be greatly simplified by damaging it directly from
// onUpdate() and removing the workaround that involved WizardData and all sorts of crazy stuff.