Gets the enchantment's id. SEL currently uses Minecraft's id to uniquely identify an enchantment.
Creates an enchantment using its Minecraft's id.
Creates an enchantment using its Minecraft: Java Edition's id.
Creates an enchantment from a string.
auto e = new Enchantment(Enchantments.sharpness, "V"); Enchantment.fromString("luck of the sea", 5); assert(e.bedrock && e.bedrock.id == 9); assert(e.minecraft.id == 16); assert(!Enchantment.fromMinecraft(71).pocket);
Class that represents an enchantment and its level.