mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Fixed confusing hierarchy of BlockGrow/Form/SpreadEvent, closes #2792
This commit is contained in:
@ -23,25 +23,11 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\event\block;
|
||||
|
||||
use pocketmine\block\Block;
|
||||
use pocketmine\event\Cancellable;
|
||||
use pocketmine\event\CancellableTrait;
|
||||
|
||||
/**
|
||||
* Called when plants or crops grow.
|
||||
*/
|
||||
class BlockGrowEvent extends BlockEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
class BlockGrowEvent extends BaseBlockChangeEvent implements Cancellable{
|
||||
|
||||
/** @var Block */
|
||||
private $newState;
|
||||
|
||||
public function __construct(Block $block, Block $newState){
|
||||
parent::__construct($block);
|
||||
$this->newState = $newState;
|
||||
}
|
||||
|
||||
public function getNewState() : Block{
|
||||
return $this->newState;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user