40    public const LEFT_CLICK_BLOCK = 0;
 
   41    public const RIGHT_CLICK_BLOCK = 1;
 
   45    protected bool $useItem = 
true;
 
   46    protected bool $useBlock = 
true;
 
   48    public function __construct(
 
   51        protected Block $blockTouched,
 
   53        protected int $blockFace,
 
   54        protected int $action = PlayerInteractEvent::RIGHT_CLICK_BLOCK
 
   56        $this->player = $player;
 
   57        $this->touchVector = $touchVector ?? Vector3::zero();
 
   60    public function getAction() : 
int{
 
   64    public function getItem() : 
Item{
 
   65        return clone $this->item;
 
   68    public function getBlock() : 
Block{
 
   69        return $this->blockTouched;
 
   72    public function getTouchVector() : 
Vector3{
 
   73        return $this->touchVector;
 
   76    public function getFace() : 
int{
 
   77        return $this->blockFace;
 
   90    public function setUseItem(
bool $useItem) : void{ $this->useItem = $useItem; }
 
   96    public function useBlock() : bool{ return $this->useBlock; }
 
  102    public function setUseBlock(
bool $useBlock) : void{ $this->useBlock = $useBlock; }