You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Correct command suggestions to match the arguments accepted by Cooking, including the current prefix and applicable permission or sender context.
COOK-01: Complete in-game preview target/actions and qualitytest modes. Offer CompositionContext after successfully parsed compose/compose2 expressions, including spaces and multiple foods; keep pickup and incomplete expression positions empty.
COOK-02: Seed known offline names at command initialization and update by join events; merge with online names, deduplicate, prefix-filter and recheck nonblocking getOfflinePlayerIfCached so expired cache entries never escape. Retain admin and husbandry command ownership.
COOK-03: Filter existing genetics/care numeric presets against current token.
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
Animal command suggestions now include matching names from previously seen players, alongside players who are online. Suggestions are kept current as players join and are displayed without case-sensitive duplicates.
Command suggestions for previews, quality tests and husbandry spawn options now filter by the text entered so far. Quality-test context suggestions appear only for valid food expressions, including supported combinations.
Bug Fixes
Invalid or incomplete food expressions no longer produce quality-test context suggestions.
Command tab completion now includes cached offline animal names and prefix-filtered suggestions for preview, quality-test, composition, and husbandry spawn arguments.
HusbandryAnimalsCommand caches offline-player names at construction and updates names when players join. Completion combines matching cached names that still resolve with matching online names, then de-duplicates and sorts them. Cooking.onEnable() registers the command as a listener. Tests cover cache updates, matching, and permission restrictions.
CommandManager filters preview, quality-test, composition, and husbandry spawn suggestions by the current input. Composition contexts are suggested only when the food expressions parse successfully. Tests cover matching, valid and invalid expressions, and sender restrictions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:M30-99 effective changed lines (tests excluded in mixed PRs).
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Correct command suggestions to match the arguments accepted by Cooking, including the current prefix and applicable permission or sender context.
COOK-01: Complete in-game preview target/actions and qualitytest modes. Offer CompositionContext after successfully parsed compose/compose2 expressions, including spaces and multiple foods; keep pickup and incomplete expression positions empty.COOK-02: Seed known offline names at command initialization and update by join events; merge with online names, deduplicate, prefix-filter and recheck nonblocking getOfflinePlayerIfCached so expired cache entries never escape. Retain admin and husbandry command ownership.COOK-03: Filter existing genetics/care numeric presets against current token.Validation:
tfmc-mvn -o -B --no-transfer-progress clean verifypassed (1200 tests, zero failures/errors; 0 skips), including command-completion regressions.git diff --checkpassed.Documentation: TF-Minecraft/Docs#266.