use of com.mcmoddev.lib.recipe.BootsRepairRecipe in project BaseMetals by MinecraftModDevelopmentMods.
the class ArmorRepair method parse.
@Override
public IRecipe parse(final JsonContext context, final JsonObject json) {
final String material = JsonUtils.getString(json, "material");
final String type = JsonUtils.getString(json, "armorType").toLowerCase();
final MMDMaterial mat = Materials.getMaterialByName(material.toLowerCase());
switch(type) {
case "boots":
return new BootsRepairRecipe(mat);
case "leggings":
return new LeggingsRepairRecipe(mat);
case "chestplate":
return new ChestplateRepairRecipe(mat);
case "helmet":
return new HelmetRepairRecipe(mat);
case "shield":
return new ShieldRepairRecipe(mat);
default:
throw new JsonSyntaxException("Unknown Armor Type '" + type + "' specified!");
}
}
Aggregations