Move enchanting seed generation to EnchantmentHelper

This commit is contained in:
Dylan K. Taylor
2023-08-23 15:52:49 +01:00
parent 29fdc8b08d
commit d942748203
3 changed files with 14 additions and 6 deletions

View File

@ -119,7 +119,7 @@ class EnchantTransaction extends InventoryTransaction{
//In this case, as much XP as possible will be taken.
$this->source->getXpManager()->subtractXpLevels(min($this->cost, $this->source->getXpManager()->getXpLevel()));
}
$this->source->setEnchantmentSeed($this->source->generateEnchantmentSeed());
$this->source->regenerateEnchantmentSeed();
}
protected function callExecuteEvent() : bool{