fix(harvest): replant triggering crop
This commit is contained in:
@@ -30,3 +30,10 @@ description: Chronological record of material decisions affecting the Spigot Har
|
||||
- Implemented deterministic connected-crop traversal, one-operation-per-player scheduling, one-crop-per-tick harvesting, protection-event checks, automatic replanting, inventory delivery, and overflow drops.
|
||||
- Added player status and boss-bar controls, five-second idle progress presentation, unlock titles, administrative inspection and mutations, offline-player lookup, and safe confirmed resets.
|
||||
- Developed the progression, traversal, drops, persistence, settings, status, and administration behavior through failing-first automated tests.
|
||||
|
||||
## 2026-08-14 — Triggering crop replant fix
|
||||
|
||||
- Changed auto-harvest to process and replant the manually broken triggering crop immediately before animating connected crops.
|
||||
- Kept the triggering crop inside the level cap, so Level I processes the trigger and at most three connected crops.
|
||||
- Added regression coverage for triggering-crop execution, replanting, and operation-cap accounting.
|
||||
- Verified the fix with `./gradlew clean check jar`.
|
||||
|
||||
@@ -13,7 +13,7 @@ As a **player**, I want one normal crop break to harvest a connected area at a v
|
||||
|
||||
- [x] Normally breaking a fully grown supported crop starts auto-harvest when the player has at least Level I for that crop.
|
||||
- [x] Breaking while sneaking performs normal single-crop harvesting and never starts auto-harvest.
|
||||
- [x] The manually broken triggering crop is included in the operation's maximum crop count.
|
||||
- [x] The manually broken triggering crop is included in the operation's maximum crop count, so Level I processes the trigger plus no more than three connected crops.
|
||||
- [x] Auto-harvest traverses only fully grown crops of the same type as the triggering crop.
|
||||
- [x] A crop is connected when its horizontal position touches the current crop in any of the eight directions and its Y coordinate differs from the current crop by no more than one block.
|
||||
- [x] Connectivity is evaluated per link, allowing a connected operation to follow gradual rises and drops.
|
||||
|
||||
@@ -11,6 +11,8 @@ As a **player**, I want harvested crops replanted and their useful drops deliver
|
||||
|
||||
## 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.
|
||||
|
||||
Reference in New Issue
Block a user