use of vazkii.botania.api.recipe.IManaInfusionRecipe in project Botania by VazkiiMods.
the class ManaInfusionProcessor method setup.
@Override
public void setup(IVariableProvider variables) {
if (variables.has("recipes") && variables.has("group")) {
BotaniaAPI.LOGGER.warn("Mana infusion template has both 'recipes' and 'group', ignoring 'recipes'");
}
ImmutableList.Builder<IManaInfusionRecipe> builder = ImmutableList.builder();
if (variables.has("group")) {
String group = variables.get("group").asString();
builder.addAll(PatchouliUtils.getRecipeGroup(ModRecipeTypes.MANA_INFUSION_TYPE, group));
} else {
for (IVariable s : variables.get("recipes").asListOrSingleton()) {
IManaInfusionRecipe recipe = PatchouliUtils.getRecipe(ModRecipeTypes.MANA_INFUSION_TYPE, new ResourceLocation(s.asString()));
if (recipe != null) {
builder.add(recipe);
}
}
}
this.recipes = builder.build();
this.hasCustomHeading = variables.has("heading");
}
Aggregations