Example #1
0
 public function onUpdate($currentTick)
 {
     if ($this->onGround and ($this->motionX != 0 or $this->motionY != 0 or $this->motionZ != 0)) {
         $this->getLevel->setBlock($this, Block::get(30));
         $this->kill();
     }
     return parent::onUpdate($currentTick);
 }
Example #2
0
 public function onUpdate($currentTick)
 {
     $this->shootingEntity->teleport($this);
     if ($this->onGround and ($this->motionX != 0 or $this->motionY != 0 or $this->motionZ != 0)) {
         $this->shootingEntity->teleport($this);
         $this->kill();
     }
     return parent::onUpdate($currentTick);
 }