Skip to content

Commit

Permalink
Backend: Make unusable enchants be valid by the enchant parser (hanni…
Browse files Browse the repository at this point in the history
  • Loading branch information
VixidDev authored Nov 2, 2024
1 parent 73dd41d commit 8df1187
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ object EnchantParser {
*/
val enchantmentExclusivePattern by patternGroup.pattern(
"exclusive",
"(?:(?:§7§l|§d§l|§9)+([A-Za-z][A-Za-z '-]+) (?:[IVXLCDM]+|[0-9]+)(?:[§r]?§9, |\$| §8\\d{1,3}(?:[,.]\\d{1,3})*)[kKmMbB]?)+\$",
"^(?:(?:§7§l|§d§l|§9|§7)+([A-Za-z][A-Za-z '-]+) (?:[IVXLCDM]+|[0-9]+)(?:[§r]?§9, |\$| §8\\d{1,3}(?:[,.]\\d{1,3})*)[kKmMbB]?)+\$",
)
// Above regex tests apply to this pattern also
val enchantmentPattern by patternGroup.pattern(
"enchants.new",
"(§7§l|§d§l|§9)(?<enchant>[A-Za-z][A-Za-z '-]+) (?<levelNumeral>[IVXLCDM]+|[0-9]+)" +
"(§7§l|§d§l|§9|§7)(?<enchant>[A-Za-z][A-Za-z '-]+) (?<levelNumeral>[IVXLCDM]+|[0-9]+)" +
"(?<stacking>(§r)?§9, |\$| §8\\d{1,3}([,.]\\d{1,3})*[kKmMbB]?)",
)
private val grayEnchantPattern by patternGroup.pattern(
Expand Down

0 comments on commit 8df1187

Please sign in to comment.