Refactor mining speed logic into common modules#3
Merged
Conversation
a810d8e to
486f8a3
Compare
…e mining speed logic into common modules
…roduce shared server config contract
… generic config entry models
24a4a9a to
63e1cdf
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors deepslate mining-speed behavior and server config definitions into shared/common modules so loader-specific code (Forge/Neo) focuses on registration/events and registry/tag adaptation.
Changes:
- Introduces a shared
SoftDeepslateLogic(per MC version) that owns block/tag caching and mining-speed decisions. - Adds a loader-agnostic server config contract + shared config entry metadata (
ModServerConfigEntries) and ID/tag validation helpers. - Adds generic
ConfigEntryrecord models (range/list/enum/etc.) undernet.meatwo310.mdk.config.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| common/src/main/java/net/meatwo310/softdeepslate/config/ModServerConfigValidator.java | Shared ID/tag validation contract for loader configs. |
| common/src/main/java/net/meatwo310/softdeepslate/config/ModServerConfigEntries.java | Centralizes mining speed + block/tag list keys/defaults/comments. |
| common/src/main/java/net/meatwo310/softdeepslate/config/ModServerConfig.java | Common interface for accessing server config values. |
| common/src/main/java/net/meatwo310/mdk/config/ConfigEntry.java | Base model for config entry metadata. |
| common/src/main/java/net/meatwo310/mdk/config/ConfigSimpleEntry.java | Simple value config entry model. |
| common/src/main/java/net/meatwo310/mdk/config/ConfigRangeEntry.java | Range-bounded config entry model. |
| common/src/main/java/net/meatwo310/mdk/config/ConfigListEntry.java | List config entry model (plus new-element value). |
| common/src/main/java/net/meatwo310/mdk/config/ConfigInListEntry.java | “Value must be one of allowed values” entry model. |
| common/src/main/java/net/meatwo310/mdk/config/ConfigEnumEntry.java | Enum config entry model. |
| common/src/main/java/net/meatwo310/mdk/config/ConfigValidatedEntry.java | Predicate-validated config entry model. |
| 26.1-neo/src/main/java/net/meatwo310/softdeepslate/config/ServerConfig.java | Neo server config now pulls definitions from shared entries + shared validator. |
| 26.1-neo/src/main/java/net/meatwo310/softdeepslate/ModMain.java | Neo event handler now delegates mining-speed decisions/cache to SoftDeepslateLogic. |
| 26.1-common/src/main/java/net/meatwo310/softdeepslate/SoftDeepslateLogic.java | Common cache + mining-speed logic for 26.1 line (Identifier-based). |
| 1.20.1-forge/src/main/java/net/meatwo310/softdeepslate/config/ServerConfig.java | Forge server config now pulls definitions from shared entries + shared validator (Forge-specific defaults). |
| 1.20.1-forge/src/main/java/net/meatwo310/softdeepslate/ModMain.java | Forge event handler now delegates mining-speed decisions/cache to SoftDeepslateLogic. |
| 1.20.1-common/src/main/java/net/meatwo310/softdeepslate/SoftDeepslateLogic.java | Common cache + mining-speed logic for 1.20.1 line (ResourceLocation-based). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
SoftDeepslateLogicmodules.net.meatwo310.mdk.configfor simple values, ranges, lists, enums, whitelists, and validated values.Commit Structure
refactor(...): move mining speed logic into common modulesrefactor(...): introduce shared server config contractrefactor(...): add generic config entry modelsValidation
./gradlew.bat build