Implemented Mending enchantment (#2257)

This commit is contained in:
Dylan K. Taylor
2018-07-06 13:28:33 +01:00
committed by GitHub
parent 5a3135659b
commit 32574118ea
3 changed files with 40 additions and 4 deletions

View File

@ -200,10 +200,7 @@ class ExperienceOrb extends Entity{
if($currentTarget->canPickupXp() and $this->boundingBox->intersectsWith($currentTarget->getBoundingBox())){
$this->flagForDespawn();
$currentTarget->addXp($this->getXpValue());
$currentTarget->resetXpCooldown();
//TODO: check Mending enchantment
$currentTarget->onPickupXp($this->getXpValue());
}
}