41 public static function grow(
Block $oldState,
Block $newState, ?
Player $causingPlayer) :
bool{
45 if($ev->isCancelled()){
48 $newState = $ev->getNewState();
51 $position = $oldState->getPosition();
52 $position->getWorld()->setBlock($position, $newState);
56 public static function spread(
Block $oldState,
Block $newState,
Block $source) :
bool{
60 if($ev->isCancelled()){
63 $newState = $ev->getNewState();
66 $position = $oldState->getPosition();
67 $position->getWorld()->setBlock($position, $newState);
71 public static function form(
Block $oldState,
Block $newState,
Block $cause) :
bool{
75 if($ev->isCancelled()){
78 $newState = $ev->getNewState();
81 $position = $oldState->getPosition();
82 $position->getWorld()->setBlock($position, $newState);
86 public static function melt(
Block $oldState,
Block $newState) :
bool{
90 if($ev->isCancelled()){
93 $newState = $ev->getNewState();
96 $position = $oldState->getPosition();
97 $position->getWorld()->setBlock($position, $newState);
101 public static function die(
Block $oldState,
Block $newState) :
bool{
105 if($ev->isCancelled()){
108 $newState = $ev->getNewState();
111 $position = $oldState->getPosition();
112 $position->getWorld()->setBlock($position, $newState);