Interface CustomDamageHandler

All Superinterfaces:
org.quiltmc.qsl.item.setting.api.CustomDamageHandler
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@Deprecated @FunctionalInterface public interface CustomDamageHandler extends org.quiltmc.qsl.item.setting.api.CustomDamageHandler
Deprecated.
Use Quilt Item Setting API's CustomDamageHandler instead.
Allows an item to run custom logic when ItemStack.damage(int, LivingEntity, Consumer) is called. This is useful for items that, for example, may drain durability from some other source before damaging the stack itself.

Custom damage handlers can be set with FabricItemSettings.customDamage(net.fabricmc.fabric.api.item.v1.CustomDamageHandler).

  • Method Summary

    Methods inherited from interface org.quiltmc.qsl.item.setting.api.CustomDamageHandler

    damage