Repository navigation
chore: compact gem stat config with shared bands - #46
Merged
Merged
Conversation
Each gem now sets its stat once and its range per rarity as one "min-max" line under bands:, either naming a shared stat-bands set or listing its own. The 40 bundled gems use five shared sets (tier-1 to tier-5) and eight inline lists; config.yml drops from 998 to 462 lines with every stat unchanged. The old rarities: blocks still load, so existing server configs need no rewrite. A gem with neither bands nor rarities now logs a warning instead of breaking the whole config load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bukkit's getConfig() falls back to the bundled config.yml for missing keys. On Dev, an older server config (rarities: blocks) therefore looked like it had bands, and getConfigurationSection built empty sections from the bundled ones, so every gem loaded with no stats. parseGem now only reads keys written in the server's file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XxFran10xX
marked this pull request as ready for review
October 17, 2026 11:07
Contributor
Author
|
@coderabbitai review |
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Change
Shorter gem config with every stat unchanged. Each gem now sets its stat once and lists each rarity's range on one line, either by naming a shared set or with its own ranges:
config.yml: 998 → 461 lines. 32 gems use the five shared sets (tier-1totier-5); the eight one-off gems list their own ranges. Nothing else in the file changes.rarities:blocks still work, so Main's and Dev's configs need no rewrite.bandswithoutstat, a range that isn'tmin-max, a gem with both shapes (bands win), or a gem with neither. A gem with neither used to break the whole config load.getConfig()falls back to the bundledconfig.ymlfor missing keys. Without this, an older server config would pick up the bundled bands, and in fact empty sections built from them. Dev caught this: the first build loaded every gem with no stats. The second commit fixes it, and a regression test covers it.Testing
config.ymlload the same 160 gem/rarity stat entries (one-off check, not committed).mvn clean verify: all tests pass locally. The newGemStatBandsTestcovers named and inline bands, every warning path, the old shape, and the bundled-defaults fallback; it also checks the bundled config gives all 40 gems four bands of one stat with no warnings. The only coverage gaps are the two stores' POSIX-permission tests, which can't run on Windows; Linux CI runs them.geminfusion reload: 40 identical lines, no warnings.🤖 Generated with Claude Code