mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Fix forge grindstone hooks allowing stacks of non-stackable items (#9457)
This commit is contained in:
1 parent
dcef406df8
commit
f2aeeeb1fe
7 files changed
+55
-7
No files matched your search
@@ -857,4 +857,12 @@ public interface IForgeItem
|
||||
return stack.isEnchanted();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@return true if the given ItemStack can be put into a grindstone to be repaired and/or stripped of its enchantments}
|
||||
*/
|
||||
default boolean canGrindstoneRepair(ItemStack stack)
|
||||
{
|
||||
// TODO 1.20: Change to return false; this changes the default behavior for all items from opt-out to opt-in.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -587,4 +587,11 @@ public interface IForgeItemStack extends ICapabilitySerializable<CompoundTag>
|
||||
return self().getItem().isNotReplaceableByPickAction(self(), player, inventorySlot);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@return true if the given ItemStack can be put into a grindstone to be repaired and/or stripped of its enchantments}
|
||||
*/
|
||||
default boolean canGrindstoneRepair()
|
||||
{
|
||||
return self().getItem().canGrindstoneRepair(self());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user