@@ -6,12 +6,12 @@ implementation detail. API major version is available as
66` OreSpawn-API-Version ` .
77
88Provider mods must depend on the full OreSpawn mod at compile time and
9- runtime. In ` mods.toml ` use a mandatory dependency, for example:
9+ runtime. In ` neoforge. mods.toml` use a required dependency, for example:
1010
1111``` toml
1212[[dependencies .examplemod ]]
1313modId =" orespawn"
14- mandatory = true
14+ type = " required "
1515versionRange =" [4.0.0,5.0.0)"
1616ordering =" AFTER"
1717side =" BOTH"
@@ -34,7 +34,7 @@ patterns, and host tags, see `DEVELOPER_GUIDE.md`.
3434
3535Definitions are immutable after ` build() ` . Registry references remain
3636` ResourceLocation ` values until OreSpawn validates and bakes them. Provider
37- messages are processed through Forge IMC and frozen at load completion; direct
37+ messages are processed through NeoForge IMC and frozen at load completion; direct
3838cross-mod mutation during parallel setup is unsupported.
3939
4040Ore dimensions use ` quantity(int) ` for fixed budgets or
@@ -77,17 +77,25 @@ WorldgenProvider provider = WorldgenProvider.builder("examplemod", 1)
7777` OilDefinition ` and template ` .oil(...) ` remain deprecated migration adapters
7878for one legacy oil rule. New integrations should use ` FluidDepositDefinition ` .
7979
80- Register custom biomes with Forge as usual. ` OreSpawnBiomes.copyAndRegister `
81- provides a small optional convenience for cloning a known biome:
80+ NeoForge 20.6 biomes are data-driven registry entries. Package biome JSON under
81+ ` data/<modid>/worldgen/biome/ ` , or generate it with a
82+ ` DatapackBuiltinEntriesProvider ` . ` OreSpawnBiomes.copyAndRegister ` is an
83+ optional bootstrap/datagen convenience for cloning a known biome:
8284
8385``` java
84- RegistryObject<Biome > candyPlains = OreSpawnBiomes . copyAndRegister(
85- BIOMES , " candy_plains" ,
86- () - > ForgeRegistries . BIOMES. getValue(new ResourceLocation (" minecraft" , " plains" )),
87- builder - > builder. temperature(0.8F ). downfall(0.4F ));
86+ public static final ResourceKey<Biome > CANDY_PLAINS = ResourceKey . create(
87+ Registries . BIOME , new ResourceLocation (" examplemod" , " candy_plains" ));
88+
89+ public static final RegistrySetBuilder BIOME_BUILDER = new RegistrySetBuilder ()
90+ .add(Registries . BIOME , context - > {
91+ HolderGetter<Biome > biomes = context. lookup(Registries . BIOME );
92+ OreSpawnBiomes . copyAndRegister(context, CANDY_PLAINS , biomes, Biomes . PLAINS ,
93+ builder - > builder. temperature(0.8F ). downfall(0.4F ));
94+ });
8895```
8996
90- Then declare placement and materials through the same provider:
97+ The generated biome JSON remains owned by the child mod. Declare placement and
98+ materials through the same OreSpawn provider:
9199
92100``` java
93101WorldgenProvider provider = WorldgenProvider . builder(" examplemod" , 1 )
@@ -130,7 +138,7 @@ Y query. Sampling is read-only and is intended for gameplay decisions,
130138diagnostics, and compatible generation outside OreSpawn's block loops.
131139Callbacks inside OreSpawn generation loops are intentionally unsupported.
132140
133- Custom pattern mods create a Forge ` DeferredRegister<OrePatternType> ` using
141+ Custom pattern mods create a NeoForge ` DeferredRegister<OrePatternType> ` using
134142` OreSpawnPatternRegistry.REGISTRY_NAME ` . An ` OrePatternType ` contains a codec
135143and a compiler from decoded settings to ` CompiledOrePattern ` . Reference it from
136144an ore dimension with ` pattern(patternId, settingsJson) ` . OreSpawn decodes and
0 commit comments