More Enchantment API

Co-authored-by: Luis <luisc99@icloud.com>
Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
This commit is contained in:
Jake Potrebic
2021-05-06 19:58:03 -07:00
parent fce24f3b52
commit bff4794867
3 changed files with 177 additions and 4 deletions

View File

@@ -0,0 +1,28 @@
package io.papermc.paper.enchantments;
/**
* @deprecated Enchantments do not have a "rarity" since 1.20.5
*/
@Deprecated(forRemoval = true, since = "1.20.5")
public enum EnchantmentRarity {
COMMON(10),
UNCOMMON(5),
RARE(2),
VERY_RARE(1);
private final int weight;
EnchantmentRarity(int weight) {
this.weight = weight;
}
/**
* Gets the weight for the rarity.
*
* @return the weight
*/
public int getWeight() {
return weight;
}
}