MinionCore logoMinionCore

Farmer

How the farmer minion harvests crops, replants them and which blocks it never touches.

The farmer keeps a field harvested for you. It waits until a crop is fully grown, cuts it, puts the drops in its storage and plants the crop again, so the field never needs a player to walk over it.

What it works on

The farmer only looks at blocks inside its own area. The area is its range from the current level in every direction, and height blocks up and down (1 in the shipped minions/farmer.yml). A tall plant only needs its bottom block inside the area. See Levels and upgrades for how range grows.

Each crop has its own switch under settings.crops. All of them are on in the shipped file.

KeyCropWhen it is cut
WHEATWheatFully grown
CARROTSCarrotsFully grown
POTATOESPotatoesFully grown
BEETROOTSBeetrootFully grown
NETHER_WARTNether wartFully grown
COCOACocoa podsFully grown
SUGAR_CANESugar caneTwo or more blocks tall
CACTUSCactusTwo or more blocks tall
BAMBOOBambooTwo or more blocks tall
MELONMelonsJoined to a stem, see Melons and pumpkins
PUMPKINPumpkinsJoined to a stem, see Melons and pumpkins

Set a crop to false and the farmer walks past it.

The ripeness rule

Wheat, carrots, potatoes, beetroot, nether wart and cocoa are only cut at their last growth stage. A crop that is still growing is left alone until it is ready, so a farmer never wastes a half grown field.

Replanting

settings:
  replant: true
  replant-from-drops: true
KeyDefaultWhat it does
replanttrueA harvested crop is set straight back to its first growth stage in the same spot. With it off, the crop block is removed and the ground is left empty.
replant-from-dropstrueOne seed is taken out of the drops to pay for the replant, the way a player would. With it off, the replant is free and every drop goes to storage.

Replanting applies to wheat, carrots, potatoes, beetroot, nether wart and cocoa. When replant-from-drops is on and the drops happen to hold no seed, the crop is still replanted.

Cocoa pods

Cocoa is replanted in place, so the new pod stays on the same jungle log and faces the same way as the one that was cut. You never have to fix the direction of a pod by hand.

Sugar cane, cactus and bamboo

These three grow in stacks, and the farmer treats a stack as one plant. It targets the bottom block of a stack that has at least one more block of the same plant on top, and in one action cuts every block above it, however tall the plant has grown (up to 32 blocks). The bottom block is never cut, so the plant grows back and the farmer returns for it. A single block on its own is left alone.

Only the bottom block has to be inside the work area, so a height of 1 is enough for a tall stalk. When a stack grows, its bottom block is marked for the farmer again straight away.

Melons and pumpkins

settings:
  fruit-needs-stem: true

With the shipped fruit-needs-stem: true, a melon or pumpkin is only picked when a stem next to it is joined to it. The whole fruit block is taken, and the stem is left in the ground to grow the next one. A melon or pumpkin a player placed with no stem joined to it is not touched, so a farmer never eats a build made of pumpkins.

Set fruit-needs-stem to false and the farmer picks every melon and pumpkin in its area, including ones placed by hand. MELON and PUMPKIN under settings.crops still have to be on.

Planting empty farmland

settings:
  plant-empty-farmland: false

This is off by default. Switch it on and the farmer also:

  • plants empty farmland in its area, using wheat seeds, carrots, potatoes or beetroot seeds from its own storage
  • tills plain dirt in its area into farmland, as long as the block above it is empty

Only DIRT and FARMLAND are used, and both only happen while a seed is in storage. A farmer with no seeds leaves empty farmland and dirt exactly as they are, so it never tills ground it cannot plant. The farmer uses the first plantable seed it finds in its storage. Nether wart and cocoa are never planted this way.

With plant-empty-farmland: true and seeds in storage, every dirt block with air above it inside the area is turned into farmland. Keep dirt paths and decoration out of the farmer's area, or leave this switch off.

The block a minion stands on is never tilled, planted or harvested, whether it is this farmer or another minion. Blocks that hold data, such as chests and signs, are never touched either.

If the farmer has a filter, make sure it keeps the seeds you want it to plant. A seed the filter throws away never reaches storage. See Filters.

The tool and Fortune

settings:
  tool:
    material: DIAMOND_HOE
    enchantments:
      fortune: 0

The drops are worked out as if this tool broke the crop, so its enchantments count. Raise fortune to give the farmer bigger harvests on crops that Fortune affects, such as carrots, potatoes, beetroot, nether wart and melons. A level of 0 means no enchantment. If the tool section is missing, a plain diamond hoe is used.

Silk touch upgrade

The shipped silk-touch upgrade in upgrades.yml accepts farmers. It puts silk touch on the tool while the drops are worked out. For crops that only changes melons, which then drop as a melon block instead of melon slices. Every other crop drops the same as before. See Levels and upgrades.

Block list

settings:
  block-list:
    mode: OFF
    blocks: []

The block list narrows down what the farmer works on, on top of the crops switches.

modeWhat it does
OFFThe list is not used. This is the shipped value.
BLACKLISTCrops named in blocks are never harvested, and dirt or farmland named in blocks is never tilled or planted.
WHITELISTOnly crops named in blocks are harvested. Tilling and planting are not limited by a whitelist.

Entries are block names such as WHEAT, SUGAR_CANE or FARMLAND, or ItemsAdder blocks as itemsadder:namespace:id. For sugar cane, cactus and bamboo the list is checked on the bottom block of the stack. A mode other than the three above logs a warning and switches the list off, and a name that is not a block on your version is skipped with a warning.

Players can also narrow this down per minion with the block filter, which is checked after this list.

Order

settings:
  order: NEAREST
ValueWhat happens
NEARESTThe ripe crop closest to the minion is cut first.
RANDOMA random ripe crop in the area is picked each time.

The farmer does one harvest per action. How often it acts comes from the delay of its level, see Levels and upgrades.

On this page