Three correctness passes that remove lie-to-the-user code and add real
test coverage on the drop logic. Nothing broke; build + 6 GameTests green.
== Remove dead OreGenConfig (lie to the user) ==
OreGenConfig (veinSize/veinsPerChunk/min/max) was NEVER read anywhere
(grep ORE_GEN. -> NONE), and its defaults did not even match the JSONs:
- copperhighore: JSON count=20 vs config default 2 (10x)
- concentratedcoalore: JSON count=10 vs default 2 (5x)
- deepslateironore: JSON count=20 vs impureIronOreCount default 2 (10x)
- sharddiamondblockore: JSON size=4 vs shardDiamondOreSize default 8 (2x)
So a user reading the generated .toml was actively misled ("2 iron veins
per chunk" when 20 generate). Branching it to runtime config is
architecturally impossible in NeoForge (datapacks load before the runtime
config - the same problem ConfigGatedFeaturesModifier solves). Removed
the class + instance + matching structural tests. Vein params now live
only in the data-driven JSONs, like vanilla.
== Remove dead EnchantabilityFix (non-compiling API) ==
EnchantabilityFix was fully commented out because it referenced
DataComponents.ENCHANTABLE and net.minecraft.world.item.enchantment.Enchantable,
which DO NOT EXIST in 1.21.1 (confirmed via javap on neoforge-21.1.219.jar:
only ENCHANTMENTS / ENCHANTMENT_GLINT_OVERRIDE / STORED_ENCHANTMENTS exist).
Uncommenting it would fail to compile. Enchantability already works
natively via the enchantable tags
(data/minecraft/tags/item/enchantable/{mining,weapon,armor,durability}.json
- all Shard Diamond tools + armor listed) combined with the Tier
getEnchantmentValue()==9. Deleted the dead class.
== Extract & test drop math ==
ConfigurableOreDropsProcedure is hand-written (git log shows fix(drops)/
replace-event-with-GlobalLootModifier commits, no MCreator regeneration).
Extracted the pure fortune/drop/XP math into OreDropMath -> procedure now
delegates: dropCount = OreDropMath.dropCount(...), XP = experienceFor(...).
Added OreDropMathTest (16 tests) covering:
- isMultiDropOre classification
- baseDropCount range + uniform coverage + degenerate (min==max, no draw)
- fortune: disabled/level-0 are no-ops (no RNG consumed)
- discrete ores: bonus bounded in [0, fortuneLevel], vanilla III distribution
- multiplier ores: results are exact multiples of base, vanilla III distribution
- dropCount random-draw order pinned (base then fortune)
- XP: zero-XP types (iron/gold/copper), vanilla ranges, bounds hit
- determinism: same seed -> identical sequences
The procedure is now correct-by-construction for the math; the only
untested part is the MC orchestration (player/tool/registry lookup, spawn).
== Docs ==
CLAUDE.md: mark feature toggles + enchantability as already-working,
correct the "hardcoded tools" / "EnchantabilityFix commented out" claims,
document the native enchantability path (tags + Tier.getEnchantmentValue).
Verification: ./gradlew test build -> BUILD SUCCESSFUL, 71/71 unit tests
./gradlew runGameTestServer -> 6/6 GameTests passed in 1.0s
Two cohesive passes that harden the latitude worldgen and clean up
long-standing inconsistencies.
== Bug fixes & doc alignment ==
- licence: set MIT in gradle.properties and neoforge.mods.toml
(was "Not specified" - blocks distribution)
- OreAuditHandler: fix javadoc that referenced a non-existent system
property; the trigger is the .oreaudit marker file. Add an explicit
warning about the System.exit(0) and point to LatitudeGameTest as the
non-destructive alternative
- KubeJS: remove the dead kubejs_version, the commented dependency and
all README claims about an "automatic KubeJS script"/KubeJSIntegration
class that no longer exists. Vanilla ore removal is now native via the
neoforge:remove_features biome modifier
- README: refresh the technical header (1.21.1 / NeoForge 21.1.219 /
Java 21 / v3.2, was 1.20.1/Forge/Java17/v2.1.5) and the shard-diamond
surface note (both variants are generated, gated by shardDiamondOre)
- CLAUDE.md / CONFIG_INTEGRATION_GUIDE.md: mark the feature toggles and
tool stats as wired (they read ModConfigs at runtime); correct the
"hardcoded tools" claim
== Generation tests (56 unit + 6 GameTest, all green) ==
- Extract the pure geometry of LatitudeBiomeSource into LatitudeMath
(temperature, 3-zone underground model, spawn safe zone, dual-octave
selector index). LatitudeBiomeSource now delegates to it, so one
source of truth drives both runtime and tests - no behaviour drift
- LatitudeMathTest (21): temperature clamp/monotonicity, zone boundaries
without gaps, Deep Dark / cave threshold predicates, spawn-safe square
symmetry, selector index bounds + near-uniform distribution
- BiomeBandTest (18): fromTemperature boundary cases, surface/ocean
pool non-empty, cave biomes never in a surface pool
- ModConfigsTest (+2 guards): every ConfigHelper toggle string maps to
a real FeatureToggleConfig field, so a typo cannot silently produce a
dead toggle (default: return true)
- LatitudeGameTest (+4 server tests): determinism (1485 pts, 0 mismatch),
no cave biome at surface (160k samples, 0 leak), surface continuity
(7% transitions - large biomes), climate gradient (north=cold 100%,
south=hot 100%, equator cold 0%)
== Build ==
- build.gradle: addModdingDependenciesTo(sourceSets.test) so pure unit
tests can reference Minecraft types without a full game server
- neoforge.mods.toml: optional BOP/create/mekanism dependencies removed;
declared with mandatory=false + versionRange="[0,)" they broke mod
loading when the mods were absent ("requires X 0 or above"). Optional
integration is already handled via data tags (required:false) and
data-only recipes that no-op if the mod is missing
- gradlew: restore executable bit
Verification: ./gradlew test build -> BUILD SUCCESSFUL, 56/56 unit tests
./gradlew runGameTestServer -> 6/6 GameTests passed in 840ms
- Created ShardDiamondArmorMaterial class with proper getName() returning "custom_ore_gen:shard_diamond"
- Updated all armor items to use the new material instance
- Added new armor textures from new_armor folder
- Fixed armor texture loading by using correct modid:name format in getName()
- Added CLAUDE.md for project documentation
- Added armor crafting recipes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>