Skip to content

fix: show the claim hint for ridden unowned mounts - #60

Merged
XxFran10xX merged 1 commit into
mainfrom
fix/mount-claim-hint
Sep 30, 2026
Merged

XxFran10xX merged 1 commit into
mainfrom
fix/mount-claim-hint

Conversation

@XxFran10xX

@XxFran10xX XxFran10xX commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Follow-up to fix: keep only Cooking-owned horses and explain claiming #57 (v0.3.14). Mounting a horse enrolls it (stats row) before the hint check runs. Because needsClaim is false for enrolled mounts, horse riders never got the claim hint or their animal count. The main case fix: keep only Cooking-owned horses and explain claiming #57 was meant to explain was silent.
  • HusbandryClaimHint.send now fires for any unowned animal on the remove-unowned list (isUnclaimed). needsClaim still decides the wording:
    • Kept by the cleanup (ridden, enrolled mount): "This horse is not claimed. Anyone can ride it or claim it until someone does."
    • Removed by the cleanup: the existing "Unclaimed animals disappear the next time their area loads."
  • The claim instructions, the limit count, the at-cap release instructions and the staff wording are unchanged. So is the load cleanup: only Cooking-owned horses and enrolled wild mounts survive a chunk load.

Documentation impact

Contract

  • Affected behavior: players who ride or tame an unowned horse, donkey, mule or camel now get the claim hint.
  • Tests run: mvn clean verify passed 276 tests (0 failures). New tests: a ridden unowned horse gets the "anyone can ride it" hint with the tame step and count; an owned horse gets no hint.
  • TFMCDev01 (this build, the only Cooking jar): a mineflayer bot rode an unclaimed horse and received the three-line hint with 0/15. After a forced chunk unload and reload, the tamed, named and saddled unowned horse and the never-ridden wild horse were removed. The ridden (enrolled) horse and a control armor stand remained.
  • Player wiki (ProvinceSystem /wiki/animal-husbandry): no change.

Notes

  • Config source is src/main/resources. Do not edit target/.
  • cookware.yml is not loaded.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added clearer claim hints when taming or riding unowned animals, including whether they will remain wild or disappear when their area loads.
    • Hints now show the taming step and current animal count for eligible unowned horses. Owned horses no longer receive these hints.

Riding enrolls a horse before the hint check, so needsClaim was false
and horse riders never saw how to claim or their animal limit. Hint
every unowned remove-unowned animal; ridden mounts the cleanup keeps
say that anyone can ride or claim them instead of that they vanish.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: effd79ee-e92b-4c6c-a20d-f16edc660250

📥 Commits

Reviewing files that changed from the base of the PR and between 981db2c and 1b92d4b.

📒 Files selected for processing (2)
  • src/main/java/net/tfminecraft/cooking/husbandry/HusbandryClaimHint.java
  • src/test/java/net/tfminecraft/cooking/husbandry/HusbandryOwnedMountTest.java

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Claim hints now include unowned animals configured for unowned removal, including animals that remain wild. The warning text distinguishes wild animals from animals that disappear when their area loads. Tests cover both unowned and owned horses.

Changes

Husbandry Claim Hints

Layer / File(s) Summary
Claim hint eligibility and messaging
src/main/java/net/tfminecraft/cooking/husbandry/HusbandryClaimHint.java
isUnclaimed identifies eligible unowned animals. send uses this predicate and passes whether the animal stays wild to lines, which selects the corresponding warning.
Claim hint test coverage
src/test/java/net/tfminecraft/cooking/husbandry/HusbandryOwnedMountTest.java
Tests cover a hint for an enrolled, unowned horse and no messages for an owned horse. Existing tests pass the new argument to lines.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 1b92d

This change shows claim hints to players who ride unowned mounts, and the wording now says whether the animal will disappear. No merge-blocking risk was found.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: showing claim hints for ridden unowned mounts.
Description check ✅ Passed The description includes all required sections. It explains the behavior change, documentation impact, affected behavior, tests, validation results, player wiki status, and repository notes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


A rabbit reads the hint with care,
An unowned horse is waiting there.
If wild, it stays; if not, it may go,
The message tells the player so.
Hop, hop, tests confirm the view.

Comment @coderabbitai help to get the list of available commands.

@XxFran10xX
XxFran10xX merged commit 2efaf1f into main Sep 30, 2026
2 checks passed
@XxFran10xX
XxFran10xX deleted the fix/mount-claim-hint branch September 30, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant