mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-09 21:24:53 +00:00
Durable: fix misbehaviour of isBroken() since fe982c697bec3265c4222b73fe5ed17c9ef3b1ce (#5436)
this broke tool and armour break sounds.
This commit is contained in:
parent
2db86d151f
commit
95263795a8
@ -121,7 +121,7 @@ abstract class Durable extends Item{
|
|||||||
* Returns whether the item is broken.
|
* Returns whether the item is broken.
|
||||||
*/
|
*/
|
||||||
public function isBroken() : bool{
|
public function isBroken() : bool{
|
||||||
return $this->damage >= $this->getMaxDurability();
|
return $this->damage >= $this->getMaxDurability() || $this->isNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function deserializeCompoundTag(CompoundTag $tag) : void{
|
protected function deserializeCompoundTag(CompoundTag $tag) : void{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user