code: public function write($encoding, $x = 1, $y = 1)
      {
          if ($this->getName()) {
              $encoding->add($this->getName() . '.x', $x);
              $encoding->add($this->getName() . '.y', $y);
          } else {
              $encoding->add('x', $x);
              $encoding->add('y', $y);
          }
      }
docs: Dispatches the value into the form encoded packet.
  
  @param SimpleEncoding $encoding    Form packet.
  @param int $x                  X coordinate of click.
  @param int $y                  Y coordinate of click.