Examples of IFarmHousing


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
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.