public function onRedstoneUpdate($type, $power)
{
if ($type === Level::REDSTONE_UPDATE_BLOCK) {
$side = $this->getDamage();
$faces = [1 => 4, 2 => 5, 3 => 2, 4 => 3, 5 => 0, 6 => 0, 0 => 0];
if (!$this->getSide($faces[$side])->isCharged($this->getHash())) {
return;
}
$this->id = 75;
$this->getLevel()->setBlock($this, $this, true, false);
$this->BroadcastRedstoneUpdate(Level::REDSTONE_UPDATE_BREAK, Block::REDSTONESOURCEPOWER);
$this->getSide(Vector3::SIDE_DOWN)->BroadcastRedstoneUpdate(Level::REDSTONE_UPDATE_BREAK, Block::REDSTONESOURCEPOWER);
return;
}
return;
}