Package net.fabricmc.fabric.api.item.v1
Interface FabricItemStack
public interface FabricItemStack
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanBeEnchantedWith(Enchantment enchantment, EnchantingContext context) Determines whether thisItemStackcan be enchanted with the givenEnchantment.default ItemStackReturn a leftover item for use in recipes.
-
Method Details
-
getRecipeRemainder
Return a leftover item for use in recipes.See
FabricItem.getRecipeRemainder(ItemStack)for a more in depth description.Stack-aware version of
Item.getRecipeRemainder().- Returns:
- the leftover item
-
canBeEnchantedWith
Determines whether thisItemStackcan be enchanted with the givenEnchantment.When checking whether an enchantment can be applied to an
ItemStack, use this method instead ofEnchantment.isAcceptableItem(ItemStack)- Parameters:
enchantment- the enchantment to checkcontext- the context in which the enchantment is being checked- Returns:
- whether the enchantment is allowed to apply to the stack
- See Also:
-