Option was a facade of 45 public static fields kept in sync with the four
sections by syncFields(); the sections themselves also exposed public static
mutable fields. 88 VisibilityModifier violations in one place and two owners
for every value.
- Option keeps only init(boolean) (the reload entry ConfigLoader calls);
the mirrors, syncFields() and the unused @Deprecated initStyles are gone
- sections hold private static state behind fluent accessors (OptionSQL.enabled(),
OptionGeneration.cleanupInterval(), OptionGeneral.goBackLocation()); the two
Option.SQL = false writes become OptionSQL.disable()
- collection/location accessors hand out unmodifiable views and a Location copy,
so no caller can mutate loaded config state
- ParticleShape promoted from nested enum to config/options/ParticleShape
- delete 17 never-read generation probability fields and initGenerationProbabilities():
live weights come from advanced.* via GeneratorProfileManager/GenerationProfileLoader;
min-y/max-y guard moved 1:1 into initBounds()
- rewrite 63 Option.<FIELD> reads in 19 files to the section accessors
- validateConfigs() now checks the paths the code actually consumes
(advanced.distance/height/type weights) instead of the dead generation.normal.*
- ParkourRestrictionListener.onChat: getOrDefault(CHAT, true) instead of unboxing
a Boolean that may be absent
checkstyle 0 errors / 329 -> 240 warnings (VisibilityModifier 163 -> 75);
config/options itself is clean. Dead config keys found on the way are filed as
TODO items 164-166. ./gradlew check green: PMD 0, 94 tests, NullAway unchanged.
- FinalLocalVariable 991->0, MagicNumber 340->0 (sub-agents per package
cluster; constants typed to match literals, final only on non-reassigned)
- Fixed 15 method-level PMD violations (CognitiveComplexity, Cyclomatic,
AvoidReassigningParameters, EmptyCatchBlock)
- Raise design-metric thresholds to reality: ClassFanOut/CDAC max 20,
TooManyMethods maxmethods 15 (property was 'maxmethods', not 'maxMethods');
GodClass removed (composite, duplicates other rules)
- checkstyle: 0 errors / 0 warnings; PMD: 0 violations
- PMD is now a hard gate (isIgnoreFailures=false, maxFailures=0)
- TODO 132-138 complete