mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 23:59:53 +00:00
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
This commit is contained in:
parent
1572b31b8d
commit
fe982c697b
@ -109,6 +109,7 @@ abstract class Durable extends Item{
|
|||||||
*/
|
*/
|
||||||
protected function onBroken() : void{
|
protected function onBroken() : void{
|
||||||
$this->pop();
|
$this->pop();
|
||||||
|
$this->setDamage(0); //the stack size may be greater than 1 if overstacked by a plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user