Allow items to control the rate of repair from mending (#5102)

This commit is contained in:
Ben Staddon authored and tterrag committed 2019-04-12 13:26:15 -04:00
1 parent a0a3f9dbfb
commit fa708f93ee
3 files changed
+124 -1

No files matched your search

@@ -113,6 +113,15 @@ public interface IForgeItem
* @return True if reparable
*/
boolean isRepairable();
/**
* Determines the amount of durability the mending enchantment
* will repair, on average, per point of experience.
*/
default float getXpRepairRatio(ItemStack stack)
{
return 2f;
}
/**
* Override this method to change the NBT data being sent to the client. You