From 95263795a8174d443d6b42d9f338cb24df3686fb Mon Sep 17 00:00:00 2001 From: SlimyBoy2 <61384644+SlimyBoy2@users.noreply.github.com> Date: Sat, 26 Nov 2022 19:13:41 -0500 Subject: [PATCH] Durable: fix misbehaviour of isBroken() since fe982c697bec3265c4222b73fe5ed17c9ef3b1ce (#5436) this broke tool and armour break sounds. --- src/item/Durable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/item/Durable.php b/src/item/Durable.php index f9420503ce..887fbb4fdf 100644 --- a/src/item/Durable.php +++ b/src/item/Durable.php @@ -121,7 +121,7 @@ abstract class Durable extends Item{ * Returns whether the item is broken. */ public function isBroken() : bool{ - return $this->damage >= $this->getMaxDurability(); + return $this->damage >= $this->getMaxDurability() || $this->isNull(); } protected function deserializeCompoundTag(CompoundTag $tag) : void{