Fixed brewing recipe pages
This commit is contained in:
parent
74448ce5a3
commit
ba9ea0a62a
1 changed files with 11 additions and 1 deletions
|
@ -60,7 +60,17 @@ public class Lexicon {
|
||||||
@ZenMethod
|
@ZenMethod
|
||||||
public static void addBrewPage(String name, String entry, int page_number, String brew, IIngredient[] recipe, String bottomText) {
|
public static void addBrewPage(String name, String entry, int page_number, String brew, IIngredient[] recipe, String bottomText) {
|
||||||
LexiconEntry lexiconEntry=BotaniaHelper.findEntry(entry);
|
LexiconEntry lexiconEntry=BotaniaHelper.findEntry(entry);
|
||||||
RecipeBrew page_recipe=new RecipeBrew(BotaniaAPI.getBrewFromKey(brew),(Object[])recipe);
|
if(lexiconEntry==null)
|
||||||
|
{
|
||||||
|
MineTweakerAPI.getLogger().logError("Cannot find lexicon entry "+entry);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(BotaniaAPI.getBrewFromKey(brew)==null)
|
||||||
|
{
|
||||||
|
MineTweakerAPI.getLogger().logError("Cannot find brew "+brew);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
RecipeBrew page_recipe=new RecipeBrew(BotaniaAPI.getBrewFromKey(brew),toObjects(recipe));
|
||||||
LexiconPage page=new PageBrew(page_recipe,name,bottomText);
|
LexiconPage page=new PageBrew(page_recipe,name,bottomText);
|
||||||
MineTweakerAPI.apply(new AddPage(name,lexiconEntry,page,page_number));
|
MineTweakerAPI.apply(new AddPage(name,lexiconEntry,page,page_number));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue