mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3'
This commit is contained in:
@ -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()
|
||||
);
|
||||
|
Reference in New Issue
Block a user