Example #1
0
 public function attack($damage, EntityDamageEvent $source)
 {
     parent::attack($damage, $source);
     if ($source->isCancelled()) {
         return false;
     }
     $this->level->addParticle(new DestroyBlockParticle($this->add(0.5), Block::get(Block::LADDER)));
     $this->kill();
 }
Example #2
0
 public function attack($damage, EntityDamageEvent $source)
 {
     parent::attack($damage, $source);
     $this->close();
 }