isFullBlock = false; $this->isActivable = true; $this->meta = $meta & 0x07; } public function getDrops(Item $item, Player $player){ return array(); } public function onActivate(Item $item, Player $player){ if($player->entity->getHealth() < 20){ ++$this->meta; $player->entity->heal(3, "cake"); if($this->meta >= 0x06){ $this->level->setBlock($this, new AirBlock()); }else{ $this->level->setBlock($this, $this); } return true; } return false; } }