use of forestry.api.farming.IFarmHousing in project ForestryMC by ForestryMC.
the class CircuitFarmLogic method onInsertion.
@Override
public void onInsertion(int slot, Object tile) {
IFarmHousing housing = getCircuitable(tile);
if (housing == null) {
return;
}
logic.setManual(isManual);
housing.setFarmLogic(FarmDirection.values()[slot], logic);
}
use of forestry.api.farming.IFarmHousing in project Binnie by ForestryMC.
the class CircuitGarden method onRemoval.
@Override
public void onRemoval(int slot, Object tile) {
IFarmHousing farmHousing = getCircuitable(tile);
if (farmHousing == null) {
return;
}
farmHousing.resetFarmLogic(FarmDirection.values()[slot]);
}
use of forestry.api.farming.IFarmHousing in project Binnie by ForestryMC.
the class CircuitGarden method onInsertion.
@Override
public void onInsertion(int slot, Object tile) {
IFarmHousing housing = getCircuitable(tile);
if (housing == null) {
return;
}
logic.setManual(isManual);
housing.setFarmLogic(FarmDirection.values()[slot], logic);
}
use of forestry.api.farming.IFarmHousing in project PneumaticCraft by MineMaarten.
the class FarmLogicPlasticNormal method getFarmLogic.
@Override
protected IFarmLogic getFarmLogic(IFarmHousing housing) throws Throwable {
ArrayList<IFarmable> origList = (ArrayList<IFarmable>) Farmables.farmables.get("farmVegetables");
ArrayList<IFarmable> backup = new ArrayList<IFarmable>(origList);
origList.clear();
origList.add(new FarmablePlastic(getBlock()));
IFarmLogic logic = getLogicClass("FarmLogicVegetable").getConstructor(IFarmHousing.class).newInstance(housing);
origList.clear();
origList.addAll(backup);
return logic;
}
use of forestry.api.farming.IFarmHousing in project ForestryMC by ForestryMC.
the class CircuitFarmLogic method onRemoval.
@Override
public void onRemoval(int slot, Object tile) {
IFarmHousing farmHousing = getCircuitable(tile);
if (farmHousing == null) {
return;
}
farmHousing.resetFarmLogic(FarmDirection.values()[slot]);
}
Aggregations