BlockTransaction: Take world in constructor

This commit is contained in:
Dylan K. Taylor
2019-02-16 19:57:55 +00:00
parent 0794c94b4b
commit 22a21ecfd6
5 changed files with 30 additions and 30 deletions

View File

@ -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;

View File

@ -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;