mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-28 10:58:15 -05:00
11 lines
316 B
Java
11 lines
316 B
Java
package net.optifine.config;
|
|
|
|
import net.minecraft.enchantment.Enchantment;
|
|
|
|
public class ParserEnchantmentId implements IParserInt {
|
|
public int parse(String str, int defVal) {
|
|
Enchantment enchantment = Enchantment.getEnchantmentByLocation(str);
|
|
return enchantment == null ? defVal : enchantment.effectId;
|
|
}
|
|
}
|