Rename EnchantHelper related stuff

Perhaps this and EnchantOption should be called EnchantingHelper and EnchantingOption respectively. The terminology used is rather inconsistent, but 'enchantment' definitely isn't the right word here.
This commit is contained in:
Dylan K. Taylor
2023-08-23 16:07:02 +01:00
parent d942748203
commit bf668c0f6c
5 changed files with 14 additions and 11 deletions

View File

@ -24,7 +24,7 @@ declare(strict_types=1);
namespace pocketmine\inventory\transaction;
use pocketmine\event\player\PlayerItemEnchantEvent;
use pocketmine\item\enchantment\EnchantmentHelper;
use pocketmine\item\enchantment\EnchantHelper;
use pocketmine\item\enchantment\EnchantOption;
use pocketmine\item\Item;
use pocketmine\item\ItemTypeIds;
@ -51,7 +51,7 @@ class EnchantTransaction extends InventoryTransaction{
throw new AssumptionFailedError("Expected that inputItem and outputItem are not null before validating output");
}
$enchantedInput = EnchantmentHelper::enchantItem($this->inputItem, $this->option->getEnchantments());
$enchantedInput = EnchantHelper::enchantItem($this->inputItem, $this->option->getEnchantments());
if(!$this->outputItem->equalsExact($enchantedInput)){
throw new TransactionValidationException("Invalid output item");
}