Block sapling = GameData.getBlockRegistry().getRaw(items[0]);
if (sapling == null || sapling == Blocks.air)
throw new RuntimeException("can't find block for " + items[0]);
if (items.length == 2)
Farmables.farmables.get(tokens[0]).add(new FarmableGenericSapling(sapling, Integer.parseInt(items[1])));
else {
Item windfall = GameData.getItemRegistry().getRaw(items[2]);
if (windfall == null)
throw new RuntimeException("can't find item for " + items[2]);
Farmables.farmables.get(tokens[0]).add(
new FarmableGenericSapling(sapling, Integer.parseInt(items[1]),
new ItemStack(windfall, 1, Integer.parseInt(items[3]))));
}
} catch (Exception ex) {
Proxies.log.info("%s for farm '%s': ", errormsg, tokens[0], ex.getMessage());
}