Package forestry.api.farming

Examples of forestry.api.farming.IFarmHousing


  }

  @Override
  @SuppressWarnings("rawtypes")
  public void onInsertion(int slot, TileEntity tile) {
    IFarmHousing housing = getCircuitable(tile);
    if (housing == null)
      return;

    IFarmLogic logic;
    try {
      logic = logicClass.getConstructor(new Class[] { IFarmHousing.class }).newInstance(housing);
    } catch (Exception ex) {
      throw new RuntimeException("Failed to instantiate logic of class " + logicClass.getName() + ": " + ex.getMessage());
    }

    try {
      logic.setManual(isManual);
    } catch (Throwable e) {
      // uses older version of the API that doesn't implement setManual
    }
    housing.setFarmLogic(ForgeDirection.values()[slot + 2], logic);
  }
View Full Code Here

TOP

Related Classes of forestry.api.farming.IFarmHousing

Copyright © 2018 www.massapicom. 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.