-
-
Notifications
You must be signed in to change notification settings - Fork 2
Enchantment Table Boosting
About the Enchantment Table Chances
First, all the enchantment books in all bookshelves around the table is counted, an occurrence number and average level is obtained.
Then, the plugin pull all of them into a list of enchantment options. So [Sharpness:O=4,L=3] and [Power:O=2,L=1] wlll be
Sharpness III
Sharpness III
Sharpness III
Sharpness III
Power I
Power I
on the list.
Then, the plugin will add null
s to the list to match the number of total slots for a complete level 30 enchantment table. The amount of null
s add to the list is
NumberOfInventoryRowsInABookshelf x 9(9 slots per row) x 15(Level 30 needs 15 shelves) - SizeOfList(The size of the list in the last step)
Then, the plugin will get the max chance defined in the config and add more null
s to the list, the amount is addition null
s added is as follows
SizeOfList * ((ChanceInConfig / 100) ^ -1) - SizeOfList
Finally, the plugin will choose one random item from the list to put into each of the 3 options displayed in an enchantment table, if the item chosen is Sharpness IV then it will be Sharpness IV; If the item chosen is null
then the vanilla randomly chosen enchantment will be used.
(Note that special enchantments that cannot be obtained in an enchantment table will not be considered)