public function onUpdate($type) { if (!$this->isPowered()) { $this->id = 123; $this->getLevel()->setBlock($this, $this, true, false); $this->BroadcastRedstoneUpdate(Level::REDSTONE_UPDATE_BLOCK, null); } }