Implemented Flame enchantment

This commit is contained in:
Dylan K. Taylor
2018-06-23 17:11:20 +01:00
parent 2f70a1eefb
commit 85a3c0e7dc
2 changed files with 4 additions and 0 deletions

View File

@ -73,6 +73,9 @@ class Bow extends Tool{
if(($powerLevel = $this->getEnchantmentLevel(Enchantment::POWER)) > 0){
$entity->setBaseDamage($entity->getBaseDamage() + (($powerLevel + 1) / 2));
}
if($this->hasEnchantment(Enchantment::FLAME)){
$entity->setOnFire($entity->getFireTicks() * 20 + 100);
}
$ev = new EntityShootBowEvent($player, $this, $entity, $force);
if($force < 0.1 or $diff < 5){