Package forestry.api.plugin
Interface IFarmingRegistration
public interface IFarmingRegistration
Register farm related data here.
Obtain an instance from
IForestryPlugin.registerFarming(forestry.api.plugin.IFarmingRegistration).-
Method Summary
Modifier and TypeMethodDescriptioncreateFarmType(net.minecraft.resources.ResourceLocation id, BiFunction<IFarmType, Boolean, IFarmLogic> logicFactory, net.minecraft.world.item.ItemStack icon) Creates a new farm type.voidmodifyFarmType(net.minecraft.resources.ResourceLocation id, Consumer<IFarmTypeBuilder> action) Modifies an existing farm type.
-
Method Details
-
createFarmType
IFarmTypeBuilder createFarmType(net.minecraft.resources.ResourceLocation id, BiFunction<IFarmType, Boolean, IFarmLogic> logicFactory, net.minecraft.world.item.ItemStack icon) Creates a new farm type. CallingIFarmTypeBuilder.setFertilizerConsumption(int)andIFarmTypeBuilder.setWaterConsumption(int)is required.- Parameters:
id- The unique ID of the farm type. SeeForestryFarmTypesfor defaults.logicFactory- The factory for creating IFarmLogic instances. The boolean is whether the logic should be manual.icon- The item- Returns:
- A builder to customize the properties of this farm type.
-
modifyFarmType
Modifies an existing farm type.- Parameters:
id- The ID of the farm type to modify. SeeForestryFarmTypesfor defaults.action- The modifications to this farm type.
-