player = $player; $this->item = $item; $this->blockTouched = $block ?? BlockFactory::get(0, 0, new Position(0, 0, 0, $player->level)); $this->touchVector = $touchVector ?? new Vector3(0, 0, 0); $this->blockFace = $face; $this->action = $action; } /** * @return int */ public function getAction() : int{ return $this->action; } /** * @return Item */ public function getItem() : Item{ return $this->item; } /** * @return Block */ public function getBlock() : Block{ return $this->blockTouched; } /** * @return Vector3 */ public function getTouchVector() : Vector3{ return $this->touchVector; } /** * @return int */ public function getFace() : int{ return $this->blockFace; } }