mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 15:41:33 +00:00
Introduced VanillaEnchantments registry
This commit is contained in:
@@ -23,7 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
use pocketmine\item\enchantment\Enchantment;
|
||||
use pocketmine\item\enchantment\VanillaEnchantments;
|
||||
|
||||
abstract class Tool extends Durable{
|
||||
|
||||
@@ -35,7 +35,7 @@ abstract class Tool extends Durable{
|
||||
$efficiency = 1;
|
||||
if($isCorrectTool){
|
||||
$efficiency = $this->getBaseMiningEfficiency();
|
||||
if(($enchantmentLevel = $this->getEnchantmentLevel(Enchantment::EFFICIENCY())) > 0){
|
||||
if(($enchantmentLevel = $this->getEnchantmentLevel(VanillaEnchantments::EFFICIENCY())) > 0){
|
||||
$efficiency += ($enchantmentLevel ** 2 + 1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user