Examples of FarmableGenericSapling


Examples of forestry.farming.logic.FarmableGenericSapling

        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());
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.