Skip to content

feat: show finish percents and hits done like the other crafting benches - #33

Merged
XxFran10xX merged 1 commit into
mainfrom
feat/finish-percents
Oct 17, 2026
Merged

XxFran10xX merged 1 commit into
mainfrom
feat/finish-percents

Conversation

@XxFran10xX

Copy link
Copy Markdown
Contributor

Summary

Makes Woodworking feedback match the other crafting stations (goldsmithing in GemInfusion, forging in AdvancedCrafting). A player reported that a ruined woodworking piece only said "the materials were lost", with no percentage.

Finishing (left-click with the branding tool)

  • After the existing title, chat now shows Recipe: X%, Hits: X% and Total: X%, like goldsmithing. This happens on both a ruin and a success. A success also shows Quality: <tier>.
  • Only an exact recipe and exact hits read 100%. Extra or wrong materials lower the recipe share. Hits with tools the piece doesn't need lower the hits share, using the same overshoot mapping as AdvancedCrafting. A near miss that rounds up shows 99%.
  • Nothing else changes: the ruin rules, the ruin title, the lost materials, the early-finish warnings and cancel refunds all work as before.

Branding status (right-click or sneak right-click)

  • After the material lines, the status now shows Hits done: with one line per tool (hits done only, never what's needed), Total: N, and Left-click branding to finish, the same as AdvancedCrafting and GemInfusion.
  • The status no longer prints the hit-type x/needed lines, so it follows the shared rule that the branding status never shows needed counts. The project menu and the per-hit titles still show the hit-type totals.

Testing

  • mvn clean verify: 33 tests, JaCoCo 100% line/branch/instruction coverage met. New tests cover the percent maths (missing, wrong and extra materials, unneeded and overshooting hits, the 99% near-miss cap, empty recipes) and the status/finish messages.
  • Dev (TFMCDev01), bot test against this build, 23/23 checks passed, using the live Marauder Rum Bottles recipe (Goldmaple x1, Hit x6, Small Hit x1):
    • Mid-project right-click and sneak right-click both list every hit done, the total and the finish hint, with no hit-type needed counts.
    • Exact craft: Recipe 100% / Hits 100% / Total 100%, Quality: Masterwork, furniture dropped.
    • 2 Goldmaple + Silk with 7 Hits: ruined with the unchanged title, Recipe 33% / Hits 42% / Total 33%, nothing refunded.
    • 1 Goldmaple with 7 Hits: ruined, Recipe 100% / Hits 42% / Total 42%.
    • Early finishes still only warn (no percents), and cancel still refunds.
    • Character bodies keep a character-less bot in the selection room. During the test, Dev's station: was pointed at a vanilla crafting table, and the project was selected through a temporary ConditionalEvents player_command. Both were restored afterwards. Woodworking logged no errors on Dev.

Draft: not for merge or release yet.

🤖 Generated with Claude Code

Finishing a woodworking project now shows Recipe, Hits and Total
percents in chat, as goldsmithing does. A ruined piece still loses its
materials and keeps its title, but now shows how close it came. Only an
exact recipe and exact hits read 100.

The branding tool's right-click status now lists every tool with the
hits done and their total, plus the finish hint, like AdvancedCrafting
and GemInfusion. Hit-type needed counts are no longer listed there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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: bc2da1e4-3c0d-4112-bbce-b5c2eb9c16f8
📥 Commits

Reviewing files that changed from the base of the PR and between 6920177 and 567fe46.

📒 Files selected for processing: 5
  • README.md
  • src/main/java/net/tfminecraft/woodworking/station/StationManager.java
  • src/main/java/net/tfminecraft/woodworking/station/WoodStation.java
  • src/test/java/net/tfminecraft/woodworking/DomainTest.java
  • src/test/java/net/tfminecraft/woodworking/StationManagerTest.java

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

📝 Summary

Summary by CodeRabbit

  • New Features
    • Station status now shows completed counts for each hit type and the total hits completed, without displaying required counts.
    • Finishing a craft attempt now shows recipe, hit and overall completion percentages, whether the craft succeeds or fails. Percentages reach 100% only when the work is exact.
    • Failed attempts display the failure title before the station is cancelled.
  • Documentation
    • Clarified that finishing an attempt shows completion percentages even when the project recipe is incorrect.

WoodStation now calculates recipe and hit completion percentages. StationManager reports completed hit counts and displays recipe, hit and total percentages for successful and failed crafts.

Changes: Station completion percentages

Layer / File(s) Summary
Calculate recipe and hit percentages
src/main/java/net/tfminecraft/woodworking/station/WoodStation.java, src/test/java/net/tfminecraft/woodworking/DomainTest.java
WoodStation calculates recipe and hit percentages. Display values reach 100 only for exact matches; other values are rounded and capped at 99. Tests cover empty, partial, exact and excess progress.
Report station progress and craft percentages
src/main/java/net/tfminecraft/woodworking/station/StationManager.java, src/test/java/net/tfminecraft/woodworking/StationManagerTest.java, README.md
StationManager reports each hit tool’s completed count and displays recipe, hit and total percentages for successful and failed crafts. Tests and README guidance cover the updated output.

Priority: ⬇️ Low

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

Change: Feature

Suggested reviewers: ryanbarlow97

Merge Risk: ⚪ Minimal · up to 567fe

This change adds completion percentages to woodworking finish messages and changes branding status output. No concrete merge-blocking risk was found.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot added the size:M 30-99 effective changed lines (tests excluded in mixed PRs). label Oct 17, 2026
@XxFran10xX
XxFran10xX marked this pull request as ready for review October 17, 2026 10:06
@XxFran10xX

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@XxFran10xX
XxFran10xX merged commit 8782a8a into main Oct 17, 2026
4 checks passed
@XxFran10xX
XxFran10xX deleted the feat/finish-percents branch October 17, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant