More Enchantment API
Co-authored-by: Luis <luisc99@icloud.com> Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user