Files
spigot-harvest/design/user-stories/us-004-replant-crops-and-distribute-drops.md
T
dmg 9f03abbefe
Release / release (push) Successful in 2m18s
CI / build (push) Successful in 57s
fix(harvest): replant triggering crop
2026-08-14 18:44:36 -04:00

31 lines
2.0 KiB
Markdown

---
type: User Story
title: "US-004: Replant crops and distribute drops"
description: Automatically replant harvested crops and deliver their remaining drops safely to the player.
status: done
---
# US-004: Replant crops and distribute drops
As a **player**, I want harvested crops replanted and their useful drops delivered to me so that auto-harvest saves repetitive work without duplicating or losing items.
## Acceptance criteria
- [x] The manually broken crop that starts auto-harvest is harvested and replanted exactly once as the first crop in the operation.
- [x] Automated regression tests cover the triggering-crop planning, cap accounting, and replant path.
- [x] Every crop successfully harvested by an auto-harvest operation is immediately replanted as the same crop at its minimum growth stage.
- [x] Replanting consumes one appropriate planting item from that crop's generated drops before remaining drops are delivered.
- [x] Wheat consumes one wheat seed, carrots consume one carrot, potatoes consume one potato, and beetroot consumes one beetroot seed when replanted.
- [x] A crop is not auto-harvested when its generated drops cannot supply the item required to replant it.
- [x] Drop quantities follow normal server crop-drop behavior and applicable tool enchantments where supported by the Spigot API.
- [x] Replanting does not consume an additional item from the player's existing inventory.
- [x] Remaining planting items, produce, and other generated drops are inserted into the initiating player's inventory.
- [x] Items that do not fit in the inventory are dropped safely near the initiating player rather than at every harvested crop.
- [x] No crop harvest duplicates or silently discards generated items.
- [x] If the initiating player becomes unavailable, the operation ends without harvesting further crops.
## Related
- [US-003: Harvest connected mature crops](us-003-harvest-connected-mature-crops.md)
- [US-007: Configure and persist harvesting behavior](us-007-configure-and-persist-harvesting-behavior.md)