ItemTemplate coal = service.getItemTemplate("Coal");
if (coal == null) {
coal = new ItemTemplate("Coal");
service.addItemTemplate(coal);
}
Recipe makeWoodCoal = service.getRecipe("Coal");
if (makeWoodCoal == null) {
List<ItemTemplate> ingredients = new ArrayList<ItemTemplate>();
ingredients.add(wood);
ingredients.add(fire);
makeWoodCoal = new Recipe("Coal", ingredients, coal);
service.addRecipe(makeWoodCoal);
}
System.out.println(makeWoodCoal.getId());
} catch (Exception ex) {
System.out.println(ex.getMessage());
}
}