Skip to main content

TinkerDamageHelper

MangoJellyPuddingOriginalMarch 29, 2025Less than 1 minute

Class Properties/Methods

Property/MethodParametersDescription
breakTool(arg0: ItemStack_): void;Breaks the item
damage(arg0: IToolStackView_, arg1: number, arg2: LivingEntity_, arg3: ItemStack_): boolean;Damages the tool with specified damage
damageAnimated(arg0: IToolStackView_, arg1: number, arg2: LivingEntity_, arg3: EquipmentSlot_): boolean;
(arg0: IToolStackView_, arg1: number, arg2: LivingEntity_, arg3: InteractionHand_): boolean;
(arg0: IToolStackView_, arg1: number, arg2: LivingEntity_): boolean;
Damages the tool and triggers specified animation when the tool breaks
directDamage(arg0: IToolStackView_, arg1: number, arg2: LivingEntity_, arg3: ItemStack_): boolean;Directly damages the tool (ignores defined getToolDamage method)
handleDamageItem<T extends LivingEntity>(arg0: ItemStack_, arg1: number, arg2: T, arg3: Consumer_<T>): void;Damages the tool and triggers a callback function
isBroken(arg0: ItemStack_): boolean;Checks if the item is broken
repair(arg0: IToolStackView_, arg1: number): void;Repairs the tool
getFakeMaxDamage(arg0: ItemStack_): number;Gets the maximum durability of the Tinkers' tool (not the maximum durability of the item stack)