Fix ItemStack#isDamageable is not calling Item#isDamagable (#7221)

This commit is contained in:
mcenderdragon authored and GitHub committed 2020-08-21 11:06:38 -07:00
1 parent 50197b1fa5
commit aaa1deeef2
6 files changed
+50 -10

No files matched your search

@@ -848,4 +848,15 @@ public interface IForgeItem
{
return false;
}
/**
* Used to test if this item can be damaged, but with the ItemStack in question.
* Please note that in some cases no ItemStack is available, so the stack-less method will be used.
*
* @param stack ItemStack in the Chest slot of the entity.
*/
default boolean isDamageable(ItemStack stack)
{
return this.getItem().isDamageable();
}
}