Environment
- Minecraft: 1.18.2
- OreSpawn candidate:
4.0.12.118021
- OreSpawn commit:
7c82ecc844ae9d241a108f4417c6c3b5b0bc29a2
- OreSpawn JAR SHA-256:
0478D611A96020DAAE794B72E64EFD677B49A5B63BCB6179330D63317B16D6A6
- Consumer: CakeWorld
master-1.18.2 at 0a3fb0dd6788d2fcad78f82d20154a772ff93d05
Shortcoming
OreSpawn schema/profile JSON and runtime baking support these ore-placement fields:
biome_ids
excluded_biome_ids
biome_dictionary
excluded_biome_dictionary
However, the public WorldgenProvider.OreDimensionDefinition model and its Builder expose none of them. A mod using the supported Forge IMC builder API therefore cannot create the same ore rule that a packaged JSON provider can create.
This is especially visible now that 4.0.12 fixes dynamic-registry biome matching: CakeWorld tried to add an isolated public-IMC regression for exact-ID and dictionary include/exclude behavior, but the public builder cannot express the regression.
The equivalent public FluidDepositDimensionDefinition already has the expected parity: fields, immutable getters, JSON serialization, and builder methods for all four filters.
Minimal reproduction
WorldgenProvider.builder("examplemod", 1)
.ore(new ResourceLocation("examplemod", "filtered_ore"),
new ResourceLocation("minecraft", "coal_ore"), ore -> ore
.dimensionSelector(OreDimensionSelector.ALL_EXCEPT_NETHER_AND_END,
placement -> placement
.yRange(32, 47)
.attempts(1.0D)
.quantity(8)
.pattern(OrePattern.CLUSTERS)
.hostBlock(new ResourceLocation("minecraft", "stone"))
.biome(new ResourceLocation("minecraft", "plains"))
.biomeDictionary("FOREST")
.excludeBiome(new ResourceLocation("minecraft", "dark_forest"))
.excludeBiomeDictionary("SPOOKY")))
.build();
Compilation stops at the first filter:
error: cannot find symbol
.biome(new ResourceLocation(...))
^
symbol: method biome(ResourceLocation)
location: class Builder
Current API gap
OreDimensionDefinition currently stores/serializes hosts and geome weights, but has no biome-filter state. Its toJson() therefore cannot emit the four fields either. This affects both explicit .dimension(...) and .dimensionSelector(...) because both consumers receive the same builder type.
By contrast, FluidDepositDimensionDefinition.Builder already exposes:
biome(ResourceLocation)
excludeBiome(ResourceLocation)
biomeDictionary(String)
excludeBiomeDictionary(String)
Expected public contract
Give OreDimensionDefinition parity with fluid deposits:
- immutable storage and getters for the four filter sets;
toJson() output using the schema field names;
- the same four fluent builder methods;
- validation/normalization consistent with JSON provider loading;
- coverage for explicit dimensions and dimension selectors;
- detached/immutable built definitions remain immutable through
toJson().
Suggested acceptance test
A public IMC provider should be able to compile and generate a diagnostic rule with:
- exact-ID included biome: output present;
- dictionary-included biome: output present;
- exact-ID excluded biome that otherwise matches: zero output;
- dictionary-excluded biome that otherwise matches: zero output;
- neutral biome: zero output;
- explicit disabled Overworld override still winning over a matching selector.
Environment
4.0.12.1180217c82ecc844ae9d241a108f4417c6c3b5b0bc29a20478D611A96020DAAE794B72E64EFD677B49A5B63BCB6179330D63317B16D6A6master-1.18.2at0a3fb0dd6788d2fcad78f82d20154a772ff93d05Shortcoming
OreSpawn schema/profile JSON and runtime baking support these ore-placement fields:
biome_idsexcluded_biome_idsbiome_dictionaryexcluded_biome_dictionaryHowever, the public
WorldgenProvider.OreDimensionDefinitionmodel and itsBuilderexpose none of them. A mod using the supported Forge IMC builder API therefore cannot create the same ore rule that a packaged JSON provider can create.This is especially visible now that 4.0.12 fixes dynamic-registry biome matching: CakeWorld tried to add an isolated public-IMC regression for exact-ID and dictionary include/exclude behavior, but the public builder cannot express the regression.
The equivalent public
FluidDepositDimensionDefinitionalready has the expected parity: fields, immutable getters, JSON serialization, and builder methods for all four filters.Minimal reproduction
Compilation stops at the first filter:
Current API gap
OreDimensionDefinitioncurrently stores/serializes hosts and geome weights, but has no biome-filter state. ItstoJson()therefore cannot emit the four fields either. This affects both explicit.dimension(...)and.dimensionSelector(...)because both consumers receive the same builder type.By contrast,
FluidDepositDimensionDefinition.Builderalready exposes:Expected public contract
Give
OreDimensionDefinitionparity with fluid deposits:toJson()output using the schema field names;toJson().Suggested acceptance test
A public IMC provider should be able to compile and generate a diagnostic rule with: