mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Implement Item.isRepairable in Crafting and Grindstone. Closes #5917
This commit is contained in:
1 parent
983e0a93db
commit
2cc264645b
5 files changed
+56
-4
No files matched your search
@@ -114,7 +114,7 @@ public interface IForgeItem
|
||||
*
|
||||
* @return True if reparable
|
||||
*/
|
||||
boolean isRepairable();
|
||||
boolean isRepairable(ItemStack stack);
|
||||
|
||||
/**
|
||||
* Determines the amount of durability the mending enchantment
|
||||
|
||||
@@ -425,4 +425,14 @@ public interface IForgeItemStack extends ICapabilitySerializable<CompoundNBT>
|
||||
return !other.isEmpty() && getStack().getCount() == other.getCount() && getStack().getItem() == other.getItem() &&
|
||||
(limitTags ? getStack().areShareTagsEqual(other) : ItemStack.areItemStackTagsEqual(getStack(), other));
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a item is reparable, used by Repair recipes and Grindstone.
|
||||
*
|
||||
* @return True if reparable
|
||||
*/
|
||||
default boolean isRepairable()
|
||||
{
|
||||
return getStack().getItem().isRepairable(getStack());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user