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
Investigation of 'no ores in BOP biomes' (highland, shrubland) reported during
in-game testing. Root cause: the early version of ConfigGatedFeaturesModifier
used a static firstCallLogged flag and threw when the COMMON config was not yet
loaded at biome-info build time, so its features were silently dropped. That
was already fixed (per-instance flag + try/catch defaulting to enabled); this
commit proves the fix end-to-end and removes the leftover debug logging.
Two automated proofs added (no manual in-game testing needed):
1. oreFeaturesAcrossBiomes GameTest: queries each biome holder's
modifiableBiomeInfo().get() (the generation settings AFTER NeoForge applies
every biome modifier). Result: every temperate biome - vanilla AND Biomes
O' Plenty (shrubland, field, moor, grassland, woodland, mediterranean_forest)
- contains the custom iron/coal/shard features. All 2 GameTests pass.
2. OreAuditHandler: a file-gated diagnostic (active only when run/.oreaudit
exists) that runs on a dedicated server, generates real chunks under the
latitude world type, scans actual ore blocks per surface biome, writes
ore_audit_report.txt, then stops. Run with level-type=
custom_ore_gen:ultra_wide_biome + the .oreaudit flag. Result on a 12x12
chunk scan: biomes with ores=5, biomes with zero ores=0. BOP biomes
(biomesoplenty:moor, biomesoplenty:grassland) contain iron, coal and shard
diamond, identical to vanilla biomes. Totals: shard=89 iron=2667 coal=4803.
Design change: biomesoplenty:highland removed from latitude_temperate_surface,
mountain_biomes and tempered_biomes tags. The user finds the biome ugly; it no
longer generates. (Its ore generation was already correct - the removal is a
pure aesthetic preference, not an ore fix.)
minecraft:birch_forest was listed in BOTH latitude_hot_surface AND
latitude_temperate_surface. Since ore generation is gated on the climate
tags, the hot-band ores (copper, pure gold, redstone) were spawning in
birch_forest - the default temperate spawn biome - so players found copper
in what looks like a temperate forest. birch_forest is a vanilla temperate
biome (temperature 0.6) and is the configured safe spawn; it never belonged
in the hot tag. Removed from hot, kept in temperate.
Also fixed a second leak: minecraft:windswept_forest was in BOTH temperate
AND cold, so it received both temperate (iron/coal) and cold (lapis/diamond)
ores. Kept in temperate only (windswept forest is not a genuinely cold biome
like snowy/taiga/grove).
Validated: each surface biome now belongs to exactly one climate tag (no
overlap). Latitude GameTest still green: spawn=birch_forest | north=100% |
south=100% | swamp=1.26% | deepDark=1.30% | caveBiomes=6.5%.
The feature toggles (enableConcentratedOres, enableImpureOres, ...) were
defined in config but never read: ConfigHelper.isFeatureEnabled() had no
caller, so the toggles were decorative. Wiring them is non-trivial because
NeoForge biome modifiers are loaded as data at bootstrap, before ModConfig
exists, so a data JSON cannot read a runtime config value directly.
Fix: a custom BiomeModifier (ConfigGatedFeaturesModifier) registered as
'custom_ore_gen:config_gated_features'. Its modify() runs at world load, when
the config is available, and only adds each feature group when its toggle is
on. The six add_*_biomes_ores.json modifiers now use this type, with each ore
mapped to its toggle:
- shardDiamondOre -> shard diamonds (surface + deep)
- concentratedOres -> concentrated coal, deepslate diamond
- impureOres -> iron (+deepslate)
- pureGoldenOre -> pure golden (+deepslate)
- customCopperOres -> copper high/lower
- customEmeraldOres -> emerald high/lower
- vanillaOreVariants -> lapis, redstone (+deepslate)
With all toggles defaulting to true, behaviour is identical to the previous
neoforge:add_features modifiers (code-equivalent), so existing worlds keep
their ores.
Also fixes a pre-existing bug: sharddiamondblockore (surface shard diamond)
was referenced by no biome modifier and never generated; it is now linked via
the shard diamond group (neoforge:any).
Dead code removed: the ash_coal feature/drop config (enableAshCoalOre,
ashCoalOreMinDrops/MaxDrops) and the 'ash_coal' drop case referenced an ore
block that was deleted long ago, plus the 'Temporarily use coal' placeholder.
Testing: the latitude GameTest still passes. A new oreGatingMatchesConfig test
verifies the shard feature presence in biome settings matches the toggle, but
skips with a note on runGameTestServer (its level is a void world with no
decoration features, so biome modifiers are not observable there); run it
against a real world to exercise the ON/OFF assertion.
Iron and Gold ores were the only ones reacting to Fortune (Fortune III could
yield up to 4 raw iron/gold per block). In vanilla 1.21, iron and gold ores
ignore Fortune entirely (the raw ore is smelted, not multiplied). Copper,
lapis and redstone legitimately keep Fortune (vanilla behavior), so those are
unchanged.
Added pureGoldenOreEnableFortune and impureIronOreEnableFortune config toggles
(default: false) for consistency with the other ores (which all have an
enableFortune toggle) and wired them into both the ConfigurableOreDropsProcedure
(XP path) and the CustomOreLootModifier (item drops path, authoritative).
Verified after a GameTest run that NeoForge merges the new keys with the
default false WITHOUT touching the user's existing custom drop values
(e.g. minDrops/maxDrops overrides are preserved). GameTest still green:
spawn=birch_forest | north=100% | south=100% | swamp=1.26% | deepDark=1.30%
| caveBiomes=6.5%.
The Create processing recipes (crushing/milling/mixing) were broken in two
ways, plus leaked parse errors when Create was absent.
1. Format migration to Create 6.x (matched against native recipes in the
Create 6.0.9 jar):
- results entries: item -> id
- processingTime -> processing_time (snake_case)
- ingredients keep item (still correct in 6.x)
2. Phantom item references: 9 recipes targeted blocks that no longer exist
(renamed/removed ores). Reaffected 8 to their real block (e.g.
highlapisore -> lapisore, goldore -> puregoldenore, highcopperore ->
copperhighore) and deleted 9 with no real equivalent or that would
duplicate an existing recipe (deepslate variants of coal/copper/emerald
that don't exist as blocks).
Result: all 16 registered ore blocks now have at least one valid Create
recipe (15 direct + sharddiamond via the forge:ores/shard_diamond tag).
3. Standalone safety: wrapped all 20 Create recipes + the Mekanism enriching
recipe in neoforge:conditions (mod_loaded) so they only parse when the
target mod is present. Without this, the RecipeManager logged ERRORs
(Unknown registry key create:crushing) on every boot when the mod ran
alone. Conditions use the sibling format, verified empirically.
Validated both configurations via runGameTestServer:
- Standalone (Create + Mekanism absent): 0 recipe parse errors, latitude OK
- With all mods (BOP + Tectonic + Create + JEI): 0 parse errors, recipes
load, latitude OK (spawn=birch_forest | north=100% | south=100% |
swamp=1.26% | deepDark=1.30% | caveBiomes=6.5%)
The mod has no hard dependency on Create (no compile dep, no Java imports,
optional in mods.toml) and now boots cleanly with zero recipe errors whether
or not Create/Mekanism are installed.
The ore biome modifiers still referenced the legacy climate tags
(cold_biomes / tempered_biomes / hot_biomes) which were out of sync with the
new latitude system (latitude_cold_surface / _temperate_surface / _hot_surface).
As a result ores did not spawn where the player would expect them, several BOP
biomes got no ores at all, and surface ores leaked into oceans.
All three climate modifiers now point at the latitude surface tags, so ore
distribution follows the climate exactly. Because the latitude tags exclude
oceans, the fix also removes iron/coal generation under oceans.
Result (verified by coverage analysis):
North (cold/frozen) -> Lapis + Diamond (27 biomes, +16 BOP)
Equator (temperate/spawn)-> Iron + Coal (31 biomes, +21 BOP)
South (hot) -> Gold + Copper + Redstone(22 biomes, +11 BOP)
0 orphan surface biomes; no ocean surface ores. GameTest still green.
Add geological depth slices to the automated GameTest: it now samples the
latitude world at three depths and renders one PNG per depth (a top-down
'view' of that Y layer):
- latitude_map_surface.png (Y=64)
- latitude_map_mid_cave.png (Y=-15)
- latitude_map_deep.png (Y=-50)
plus a report section per slice and new assertions:
- Deep Dark must stay rare in the deep zone (<8%)
- cave biomes (lush/dripstone) must stay a minority in mid-cave (<25%)
Cave biome colors are now distinct (lush=green, dripstone=orange, deep_dark=
teal) so the slices are readable.
Tuned the cave thresholds using the test as a fast feedback loop (BiomeSource-
only sampling, ~30s per run, mods-independent):
- CAVE_THRESHOLD 0.55 -> 0.38 (lush/dripstone pockets now ~6.5%)
- DEEP_DARK_THRESHOLD 0.88 -> 0.55 (Deep Dark now legendary ~1.3%; was 0%)
Validated with BOP + Tectonic:
spawn=birch_forest | north=100% | south=100% | swamp=1.26% |
deepDark=1.30% | caveBiomes=6.5%
The previous implementation forced a uniform cave-biome slab (lush/dripstone/
deep_dark) across all of Y<30, which overrode the latitude logic for a huge
volume and made the Deep Dark far too common.
New 3-zone underground model keeps the latitude surface biome as the default
at every depth (mining under a desert feels like the desert) and only carves
rare cave features on top:
- Near surface (Y >= 0): latitude biome as-is, no override.
- Mid caves (-30 <= Y < 0): lush/dripstone pockets (~8%) matching the climate
(humid/warm bands -> lush, dry/cold bands -> dripstone).
- Deep zone (Y < -30): legendary Deep Dark pockets (~1%, very low-frequency
noise so they form large rare regions suitable for Ancient Cities); the
surface latitude biome otherwise.
Deep Dark is removed from the biome band pools and driven solely by its own
noise, restoring it to a rare, legendary discovery. Cave biomes are now
resolved once and declared in possibleBiomes. BiomeBand.underground() removed
(caves are climate-driven, not band-pool-driven).
Validated by GameTest (BOP + Tectonic): spawn=birch_forest | north=100% |
south=100% | swamp=1.26%.
With Biomes O' Plenty installed, the FROZEN/HOT bands are filled with BOP
cold/hot biomes which the previous hardcoded vanilla-only assertion sets
did not include, causing a false failure (FROZEN measured 31% vs real ~100%).
Assertions now resolve the surface tags from the real registry and check
membership, so vanilla + BOP biomes are both counted. Adds a per-band
breakdown to the report for easier diagnostics.
Validated with Create + JEI + Biomes O' Plenty + Tectonic + deps:
spawn=birch_forest | north=100% | south=100% | swamp=1.26%
Run `./gradlew runGameTestServer` to validate the latitude biome system
without manual in-game testing. Boots a headless game server (full biome
registry), samples a 32000x32000 grid through LatitudeBiomeSource, renders a
PNG map and writes a distribution report, then asserts climate invariants:
- spawn on a safe biome (plains/forest)
- FROZEN band dominated by cold/frozen biomes (>60%)
- HOT band dominated by warm/hot biomes (>60%)
- swamp remains rare in the temperate band (<15%)
Outputs land in run/gametest-results/latitude/ (latitude_map.png +
latitude_report.txt). Sampling is BiomeSource-only (no chunk generation),
so it runs in ~35s regardless of installed mods.
- LatitudeGameTest: @GameTestHolder + @PrefixGameTestTemplate(false)
- structure/empty_1x1.nbt: minimal 1x1x1 air structure required by GameTest
- build.gradle: add gameTestServer run configuration
Add a latitude-based world generation system: biomes are distributed by Z
coordinate (frozen north -> temperate equator -> hot south) with extremely
large biomes on a continental scale, plus full Biomes O' Plenty support.
World types (selectable in the world creation 'World Type' button):
- Ultra Wide Biome: latitude biomes + vanilla terrain (immune to Tectonic
via a private noise_settings copy under custom_ore_gen).
- Tectonic Ultra Wide Biome: latitude biomes + minecraft:overworld terrain
(uses Tectonic when present, vanilla otherwise).
Core implementation:
- LatitudeBiomeSource: custom BiomeSource distributing biomes by latitude.
Temperature derived from Z with a boundary wobble, dual-octave selector
noise for a flat biome distribution (no biome dominates), land/ocean mask,
underground cave layer, moisture-driven rare swamp/mangrove pockets, and a
guaranteed safe spawn zone (plains/forests) around the origin.
- BiomeBand: 5 climate bands (FROZEN/COLD/TEMPERATE/WARM/HOT) with vanilla
surface pools + dedicated climate tags (latitude_*_surface) for optional
BOP biomes via required:false, plus ocean and underground pools.
- WorldGenRegistration: DeferredRegister for the 'custom_ore_gen:latitude'
BiomeSource codec.
- LatitudeSpawnHandler: pins spawn to a plains/forest biome on overworld load.
Validation:
- /latitude map [radius] [step]: samples the LatitudeBiomeSource on a large
grid, renders a top-down PNG map (run/latitude/latitude_map.png) and writes
a per-band distribution + invariant report (run/latitude/latitude_report.txt).
Constants tuned for a continental scale:
TEMPERATURE_SCALE = 16000 (equator->pole)
SURFACE_SELECTOR_SCALE = 0.00033 (biomes ~3000 blocks wide)
Swamp fix: removed from the common temperate surface tag and made rare
(~8% of temperate land via moisture noise), matching vanilla humidity biomes.
- Add CustomOreLootModifier (Global Loot Modifier) handling all ore drops,
ensuring compatibility with machines (Create drill/contraptions) and avoiding
duplication. Handles silk touch (vanilla block / shard diamond block) and
fortune via config-driven min/max drops.
- Register GLM serializer via DeferredRegister in CustomOreGenMod (user code block)
- Rewrite OreBreakEventHandler: remove direct drops mutation that caused
UnsupportedOperationException on immutable list when broken by Create drill.
Drops are now fully GLM-driven; handler only triggers XP/procedure logic.
- Migrate loot tables from loot_table/ (singular, 1.20) to loot_tables/
(plural, NeoForge 1.21 format) for all 16 ore blocks.
- Declare GLM in data/neoforge/loot_modifiers/global_loot_modifiers.json
- Add Create crushing + milling recipes for diamond -> diamond shards
- Config tweaks: tool durabilities (pickaxe/axe/shovel 450, paxel 800),
Pure Golden Ore maxHeight 256 -> 320
- Refresh shard diamond armor/item textures
- Simplify unit tests for new drop system
- Removed onDestroyedByPlayer from blocks (now handled by OreBreakEventHandler)
- Updated tests to use NeoForge classes (ModConfigSpec instead of ForgeConfigSpec)
- Fixed EnchantabilityFix annotation and commented out placeholder code
- Updated pack.mcmeta format for 1.21.1
- Registered ModConfigs.SPEC in CustomOreGenMod to avoid IllegalStateException
- Updated all recipe JSONs to use 'id' instead of 'item' in result fields
- Renamed mekanism recipes folder to match 1.21.1 conventions
- Renamed data folders to 1.21.1 standards (singular names)
- Implemented OreBreakEventHandler to call ConfigurableOreDropsProcedure
- Updated procedure and config to handle all custom and variant ores
- Modified loot tables to only handle Silk Touch (manual drops via procedure)
- Fixed missing drops issue caused by folder name mismatch in 1.21.1
- Fixed paxel recipe: now requires 1 pickaxe + 2 sticks (instead of 3 pickaxes)
- Fixed silk touch on Concentrated Diamond Ore: now drops vanilla diamond_ore
- Fixed Copper High Ore sound: changed from GRAVEL to STONE
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
- Documentation de la dépendance obligatoire KubeJS
- Création automatique du script de suppression des minerais vanilla
- Nouvel onglet créatif personnalisé
- Changelog complet de la version 2.1.5
- Architecture mise à jour avec KubeJSIntegration et ShardDiamondArmorMaterial
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
- 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]>
- Correction bug texture armure Diamond Shard (renommage textures layer_1/layer_2)
- Correction craft paxel (remplacement espace par lettre T pour stick)
- Correction compilation SharddiamondpaxelItem (getTier().getSpeed())
- Mise à jour version 2.0.6 -> 2.0.8
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>