currentSensor = (GenericSensor)myBioHolder.theHarvestSensors.get(i); currentActuator = (PlantingActuator)myBioHolder.thePlantingActuators.get(i);
currentSensor = (GenericSensor)myBioHolder.getShelfSensorAttachedTo(myBioHolder.theHarvestSensors, myBiomassRS, i); currentActuator = (PlantingActuator)myBioHolder.getShelfActuatorAttachedTo(myBioHolder.thePlantingActuators, myBiomassRS, i);
	private void doPlants() { 		float overflow, new_overflow;		float cropacres; 		GenericSensor harvestSensor; 		GenericSensor currentSensor; 		PlantingActuator currentActuator;				CO2Store myCO2Store = (CO2Store)myBioHolder.theCO2Stores.get(0);		BiomassRS myBiomassRS = (BiomassRS)(myBioHolder.theBiomassRSModules.get(0));  		currentActuator = PlantingActuatorHelper.narrow((myBioHolder.getActuatorAttachedTo(myBioHolder.thePlantingActuators, myBiomassRS)));		HarvestingActuator harvestActuator = HarvestingActuatorHelper.narrow((myBioHolder.getActuatorAttachedTo(myBioHolder.theHarvestingActuators, myBiomassRS)));				int i; 		int num = myBioHolder.theHarvestSensors.size(); 								for (i=0;i<num;i++) { 			currentSensor = (GenericSensor)myBioHolder.theHarvestSensors.get(i); 			currentActuator = (PlantingActuator)myBioHolder.thePlantingActuators.get(i); 			if (currentSensor.getValue() == 1f) { 				System.out.println(" Harvest Sensor "+currentSensor.getValue());				myBiomassRS.getShelf(i).harvest(); 				cropacres = myBiomassRS.getShelf(i).getCropAreaTotal();				System.out.println("Planting "+cropacres+" m^2."+((Shelf)myBiomassRS.getShelf(i)).getTypeString()); 				currentActuator.setPlantType(myBiomassRS.getShelf(i).getCropType());				currentActuator.setValue(cropacres);				}		}	}