Skip to main content

Agricultural Harvest Action

Type: agricultural_harvest_action Optimized action for harvesting crops in an area-of-effect, replanting immediately, and merging item drops.

Configuration

FieldTypeDefaultDescription
idString""Unique identifier for this entry
nameString""Name for this entry
criteriaList<Criteria>[]Criteria that must be met for execution
modifiersList<Modifier>[]Modifiers to apply to execution
triggersList<Ref<TriggerableEntry>>[]Triggers to execute upon completion
radiusInt1Radius on the X and Z axis to harvest (e.g. 1 for a 3x3 area)
autoReplantBooleantrueShould crops be automatically replanted (set age to 0)?

Example

{
  "id": "harvest_t3",
  "name": "Advanced Harvesting",
  "radius": 2,
  "autoReplant": true
}

Behavior

  • Only harvests fully-grown crops (Ageable with age == maximumAge)
  • Drops are merged by material type to reduce entity count
  • When autoReplant is enabled, crops are immediately set to age 0 (no physics)
  • Plays block break particles at the center of the harvested area
  • Designed to be triggered via EnchantmentEvent.BLOCK_BREAK