mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
BlockTransaction: Take world in constructor
This commit is contained in:
@ -125,10 +125,10 @@ abstract class Door extends Transparent{
|
||||
$topHalf = clone $this;
|
||||
$topHalf->top = true;
|
||||
|
||||
$transaction = new BlockTransaction();
|
||||
$transaction = new BlockTransaction($this->level);
|
||||
$transaction->addBlock($blockReplace, $this)->addBlock($blockUp, $topHalf);
|
||||
|
||||
return $transaction->apply($this->level);
|
||||
return $transaction->apply();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -53,9 +53,9 @@ class DoublePlant extends Flowable{
|
||||
$top = clone $this;
|
||||
$top->top = true;
|
||||
|
||||
$transaction = new BlockTransaction();
|
||||
$transaction = new BlockTransaction($this->level);
|
||||
$transaction->addBlock($blockReplace, $this)->addBlock($blockReplace->getSide(Facing::UP), $top);
|
||||
return $transaction->apply($this->level);
|
||||
return $transaction->apply();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user