Fixed coral block killing itself when calling getDropsForCompatibleTool()

this might be called by plugins without actually breaking the block, in which case the block will glitch.
This commit is contained in:
Dylan K. Taylor
2023-08-02 13:43:36 +01:00
parent bb0e648276
commit d88c3d8ced

View File

@ -88,7 +88,7 @@ final class CoralBlock extends Opaque{
}
public function getDropsForCompatibleTool(Item $item) : array{
return [$this->setDead(true)->asItem()];
return [(clone $this)->setDead(true)->asItem()];
}
public function isAffectedBySilkTouch() : bool{