Interface IFarmingRegistration


public interface IFarmingRegistration
Register farm related data here. Obtain an instance from IForestryPlugin.registerFarming(forestry.api.plugin.IFarmingRegistration).
  • Method Details

    • createFarmType

      IFarmTypeBuilder createFarmType(net.minecraft.resources.ResourceLocation id, BiFunction<IFarmType,Boolean,IFarmLogic> logicFactory, net.minecraft.world.item.ItemStack icon)
      Parameters:
      id - The unique ID of the farm type. See ForestryFarmTypes for 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

      void modifyFarmType(net.minecraft.resources.ResourceLocation id, Consumer<IFarmTypeBuilder> action)
      Modifies an existing farm type.
      Parameters:
      id - The ID of the farm type to modify. See ForestryFarmTypes for defaults.
      action - The modifications to this farm type.
    • registerFertilizer

      void registerFertilizer(net.minecraft.world.item.Item fertilizer, int amount)
      Registers a new fertilizer item for use in the Forestry farms. By default, the only fertilizer is the Forestry fertilizer, which is worth 500.
      Parameters:
      fertilizer - The ingredient to match items against.
      amount - The amount of fertilizer a single item is worth. Forestry's fertilizer is worth 500.