Skip to content

feat: pour BreweryX brews into the saucepan as its liquid - #89

Merged
JustinasLa merged 1 commit into
mainfrom
feat/brewery-brews-as-sauce-liquid
Oct 28, 2026
Merged

JustinasLa merged 1 commit into
mainfrom
feat/brewery-brews-as-sauce-liquid

Conversation

@JustinasLa

Copy link
Copy Markdown
Contributor

The saucepan accepted an alcohol category, but nothing on the server produced it, so real BreweryX brews were refused. A finished alcoholic brew can now be poured into an empty saucepan as its liquid, in place of water or milk.

  • Both add-in slots stay free, so Red Wine + salt + pepper works as a wine reduction.
  • Stars: Brewery's quality (1–10, shown with half stars) becomes 1–5★. Half stars round up, the same way Cooking averages ingredients. The brew counts toward the sauce's stars like the milk or water it replaces.
  • Name and colour: the recipe's quality name leads the sauce's name (e.g. "Red Wine Sauce", "Fine Wheatbeer Sauce") and the recipe colour tints it.
  • Reduced: a new tag on brew sauces, +10% food and nutrition (tags.yml).
  • Edge cases: non-alcoholic brews (coffee) are refused with a message. A white brew (vodka) does not make the sauce Creamy. The glass bottle comes back, and the brew is saved so a chunk reload keeps it.

BreweryX stays optional: the reader is installed by the existing Brewery bridge and cleared when BreweryX disables.

Server: reduced must be added to the live plugins/Cooking/tags.yml. Without it, brew sauces still work but get no bonus.

mvn verify passes locally with the line-coverage check.

🤖 Generated with Claude Code

A finished alcoholic brew now replaces the water or milk, so both add-in
slots stay free for a wine reduction with salt and pepper. Brewery's
quality (1-10, half stars) becomes the brew's 1-5 stars with half stars
rounded up, the recipe name leads the sauce's name, the recipe colour
tints it, and the sauce gets a new Reduced tag (+10% food and nutrition).
Non-alcoholic brews are refused, the bottle comes back, and the brew
survives a chunk reload.

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

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1e5d54a5-07e0-444d-b7e7-db3cea767f2a
Commits

Reviewing files that changed from the base of the PR and between bfbc4f0 and c1b22ab.

Files selected for processing: 8
  • src/main/java/net/tfminecraft/cooking/brewery/BrewLiquid.java
  • src/main/java/net/tfminecraft/cooking/brewery/BrewLiquidReader.java
  • src/main/java/net/tfminecraft/cooking/brewery/BreweryIngredientListener.java
  • src/main/java/net/tfminecraft/cooking/cooking/SauceReference.java
  • src/main/resources/tags.yml
  • src/test/java/net/tfminecraft/cooking/brewery/BrewLiquidTest.java
  • src/test/java/net/tfminecraft/cooking/brewery/BreweryIngredientTest.java
  • src/test/java/net/tfminecraft/cooking/cooking/SauceReferenceBrewTest.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
    • Alcoholic BreweryX brews can now be used as liquids in saucepans, contributing their quality and name to the resulting sauce.
    • Brew colour is reflected in the sauce when available, and brew details are retained when the saucepan is rebuilt.
    • Brew-based sauces receive the reduced cooking state, with the associated nutrition and food multipliers.
    • Non-alcoholic brews are not accepted as saucepan liquids.

Adds BreweryX brew reading and connects it to saucepan handling. Alcoholic brews can occupy the liquid slot, contribute to sauce composition, and be restored from saved furniture variables.

Changes: Brewery brew handling

Layer / File(s) Summary
Brew identification and conversion
src/main/java/net/tfminecraft/cooking/brewery/BrewLiquid.java, src/main/java/net/tfminecraft/cooking/brewery/BrewLiquidReader.java, src/test/java/net/tfminecraft/cooking/brewery/BrewLiquidTest.java
Adds brew data and BreweryX reading. The reader derives the name, star rating, colour, and alcoholic status. Tests cover conversion and null cases.
Reader registration lifecycle
src/main/java/net/tfminecraft/cooking/brewery/BreweryIngredientListener.java, src/test/java/net/tfminecraft/cooking/brewery/BreweryIngredientTest.java
Registers the brew reader after event registration. Cleanup clears the reader, and a test checks that BreweryApi lookups stop after cleanup.
Saucepan brew handling and persistence
src/main/java/net/tfminecraft/cooking/cooking/SauceReference.java, src/main/resources/tags.yml, src/test/java/net/tfminecraft/cooking/cooking/SauceReferenceBrewTest.java
Accepts alcoholic brews as saucepan liquids, records their composition and colour, and saves and restores brew data. Adds the reduced state and tests for pouring, refusal cases, serving, and reconstruction.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant PotionItem
  participant BrewLiquid
  participant SauceReference
  participant Furniture
  PotionItem->>BrewLiquid: from(item)
  BrewLiquid-->>SauceReference: recognised brew or null
  SauceReference->>Furniture: occupy liquid slot and save brew data
  SauceReference->>PotionItem: consume brew and retain glass bottle
Loading

Possibly related PRs

Suggested labels: size:M

Suggested reviewers: xxfran10xx

Merge Risk: Minimal · up to c1b22

The change is mergeable. Existing installations need the documented tag update to receive the reduced bonus.

- [ ] 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:L 100-499 effective changed lines (tests excluded in mixed PRs). label Oct 28, 2026
@JustinasLa
JustinasLa merged commit 0c322f2 into main Oct 28, 2026
3 checks passed
@JustinasLa
JustinasLa deleted the feat/brewery-brews-as-sauce-liquid branch October 28, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant