mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-16 01:55:06 +00:00
Allow items to control the rate of repair from mending (#5102)
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user