mirror of
http://git.eaglercraft.rip/eaglercraft/eaglercraft-1.8.git
synced 2025-04-30 02:01:59 -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;
|
|
}
|
|
}
|