From fe982c697bec3265c4222b73fe5ed17c9ef3b1ce Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 2 Nov 2022 15:42:44 +0000 Subject: [PATCH] Durable: reset durability when overstacked items are broken this is not really defined behaviour, but it makes more sense than the current behaviour, which makes the tool unbreakable unintentionally. fixes #5378 --- src/item/Durable.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/item/Durable.php b/src/item/Durable.php index 3b04ef381..f9420503c 100644 --- a/src/item/Durable.php +++ b/src/item/Durable.php @@ -109,6 +109,7 @@ abstract class Durable extends Item{ */ protected function onBroken() : void{ $this->pop(); + $this->setDamage(0); //the stack size may be greater than 1 if overstacked by a plugin } /**