Enhancement
Since the beginning of minecraft 1.13, the item name, block name, and entity type have been flattened. So flatten the Enchantment type name.
PROTECTION_FIRE -> FIRE_PROTECTION
PROTECTION_FALL -> FEATHER_FALLING
OXYGEN -> RESPIRATION
But don't worry, the old type name can still get the corresponding enchant type through fromName.
See below
|
// TODO Use the type name of 1.13 as the enumerated name |
|
|
|
/** |
|
* * Enchantment: Environmental Protection |
|
* * 附魔类型: 保护 |
|
*/ |
|
PROTECTION(0, 4, "PROTECTION_ENVIRONMENTAL", "protection"), |
|
/** |
|
* * Enchantment: Fire Protection |
|
* * 附魔类型: 火焰保护 |
|
*/ |
|
PROTECTION_FIRE(1, 4, "PROTECTION_FIRE", "fire_protection"), |
|
/** |
|
* * Enchantment: Fall Protection |
|
* * 附魔类型: 摔落保护 |
|
*/ |
|
PROTECTION_FALL(2, 4, "PROTECTION_FALL", "feather_falling"), |
|
/** |
|
* * Enchantment: Explosions Protection |
|
* * 附魔类型: 爆炸保护 |
|
*/ |
|
PROTECTION_EXPLOSIONS(3, 4, "PROTECTION_EXPLOSIONS", "blast_protection"), |
|
/** |
|
* * Enchantment: Projectile Protection |
|
* * 附魔类型: 弹射物保护 |
|
*/ |
|
PROTECTION_PROJECTILE(4, 4, "PROTECTION_PROJECTILE", "projectile_protection"), |
|
/** |
|
* * Enchantment: Oxygen |
|
* * 附魔类型: 水下呼吸 |
|
*/ |
|
OXYGEN(5, 3, "OXYGEN", "respiration"), |