Merge branch 'next-minor' into next-major

This commit is contained in:
Dylan K. Taylor
2022-07-20 20:55:33 +01:00
40 changed files with 189 additions and 136 deletions

View File

@ -147,13 +147,14 @@ class Door extends Transparent{
$this->open = !$this->open;
$other = $this->getSide($this->top ? Facing::DOWN : Facing::UP);
$world = $this->position->getWorld();
if($other instanceof Door && $other->isSameType($this)){
$other->open = $this->open;
$this->position->getWorld()->setBlock($other->position, $other);
$world->setBlock($other->position, $other);
}
$this->position->getWorld()->setBlock($this->position, $this);
$this->position->getWorld()->addSound($this->position, new DoorSound());
$world->setBlock($this->position, $this);
$world->addSound($this->position, new DoorSound());
return true;
}