Search in sources :

Example 1 with FarmProperties

use of forestry.farming.logic.FarmProperties in project ForestryMC by ForestryMC.

the class FarmRegistry method registerLogic.

@Override
public IFarmProperties registerLogic(String identifier, BiFunction<IFarmProperties, Boolean, IFarmLogic> logicFactory, String... farmablesIdentifiers) {
    Set<String> identifiers = new HashSet<>(Arrays.asList(farmablesIdentifiers));
    identifiers.add(identifier);
    IFarmProperties instance = new FarmProperties(logicFactory, identifiers);
    farmInstances.put(identifier, instance);
    return instance;
}
Also used : IFarmProperties(forestry.api.farming.IFarmProperties) FarmProperties(forestry.farming.logic.FarmProperties) IFarmProperties(forestry.api.farming.IFarmProperties) FakeFarmProperties(forestry.farming.logic.FakeFarmProperties) HashSet(java.util.HashSet)

Aggregations

IFarmProperties (forestry.api.farming.IFarmProperties)1 FakeFarmProperties (forestry.farming.logic.FakeFarmProperties)1 FarmProperties (forestry.farming.logic.FarmProperties)1 HashSet (java.util.HashSet)1