Disenchanter

Disenchanter

553k Downloads

Disenchanter doesn't check if item "breaks" after damage.

roobscoob opened this issue ยท 2 comments

commented

https://github.com/gliscowo/disenchanter/blob/74c85a77e9fae610cbdd2797dce173fbc66eff6a/src/main/java/com/glisco/disenchanter/catalyst/Catalysts.java#L74C19-L74C19

This call to .damage can make item's durability negative.
If the item's durability is negative, the disenchanter shouldn't return it (broken)

commented

also, ItemStack::damage checks for Unbreaking. Not sure if this is intentional, but doesn't really make sense given the context of this item

commented

Hey, thanks for bringing this to my attention! I've now changed the implementation to damage the stack directly and also handle the case that it breaks.

These changes are available in the 0.1.9+1.20.2 release
Cheers