public function onActivate(Item $item, Player $player = null) { $this->meta ^= 0x8; $this->getLevel()->setBlock($this, $this, true, false); if ($this->isActivated()) { $this->activate(); } else { $this->deactivate(); } return true; }