Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3'

This commit is contained in:
Dylan K. Taylor
2020-04-18 17:33:05 +01:00
76 changed files with 286 additions and 238 deletions

View File

@ -107,14 +107,14 @@ class Lever extends Flowable{
}
if(!$this->getSide($face)->isSolid()){
$this->pos->getWorld()->useBreakOn($this->pos);
$this->pos->getWorldNonNull()->useBreakOn($this->pos);
}
}
public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null) : bool{
$this->powered = !$this->powered;
$this->pos->getWorld()->setBlock($this->pos, $this);
$this->pos->getWorld()->addSound(
$this->pos->getWorldNonNull()->setBlock($this->pos, $this);
$this->pos->getWorldNonNull()->addSound(
$this->pos->add(0.5, 0.5, 0.5),
$this->powered ? new RedstonePowerOnSound() : new RedstonePowerOffSound()
);