Enchanting Table
Allows for automated enchanting and getting information about enchantments
Functions | Description |
---|---|
getEnchantsFor(from, slot) | Gets all possible enchantments for the item |
enchant(from, slot, resources) | Enchants an item with a random supported enchantment, if there is enough resources to do so |
getEnchantsFor(from, slot)
Description
Gets all possible enchantments for the item
Parameters
- from: string - Inventory from where to get the item
- slot: number - The slot for the item
Returns
- boolean - The state of the operation
- string | table - Error message, If there is a failure on the operation or a table with a list for all supported enchantments
enchant(from, slot, resources)
Description
Enchants an item with a random supported enchantment, if there is enough resources to do so
Parameters
- from: string - Inventory from where to get the item to enchant
- slot: number - The slot for the item to enchant
- resources: string - Inventory with the needed resources to do the enchantment
💡 IMPORTANT
The enchantment process consumes 8 Bottles o' Enchanting and 1 lapis lazuli per enchant
Returns
- boolean - The state of the operation
- string - Error message, If there is a failure on the operation