Skip to content

Commit

Permalink
Update 1.21.3 biomemodifier.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Bittorn authored Feb 15, 2025
1 parent 3bbf0a6 commit 7f9fcb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions versioned_docs/version-1.21.3/worldgen/biomemodifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -618,15 +618,15 @@ public record ExampleBiomeModifier(HolderSet<Biome> biomes, int value) implement

@Override
public MapCodec<? extends BiomeModifier> codec() {
return EXAMPLE_BIOME_MODIFIER.value();
return EXAMPLE_BIOME_MODIFIER.get();
}
}

// In some registration class
private static final DeferredRegister<MapCodec<? extends BiomeModifier>> BIOME_MODIFIERS =
DeferredRegister.create(NeoForgeRegistries.Keys.BIOME_MODIFIER_SERIALIZERS, MOD_ID);

public static final Holder<MapCodec<? extends BiomeModifier>> EXAMPLE_BIOME_MODIFIER =
public static final Supplier<MapCodec<ExampleBiomeModifier>> EXAMPLE_BIOME_MODIFIER =
BIOME_MODIFIERS.register("example_biome_modifier", () -> RecordCodecBuilder.mapCodec(instance ->
instance.group(
Biome.LIST_CODEC.fieldOf("biomes").forGetter(ExampleBiomeModifier::biomes),
Expand Down Expand Up @@ -714,4 +714,4 @@ protected void addTags(HolderLookup.Provider registries) {
[staticreg]: ../concepts/registries.md#methods-for-registering
[datapacks]: ../resources/index.md#data
[datagen]: ../resources/index.md#data-generation
[datapackdatagen]: ../concepts/registries#data-generation-for-datapack-registries
[datapackdatagen]: ../concepts/registries#data-generation-for-datapack-registries

1 comment on commit 7f9fcb5

@neoforged-pages-deployments
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploying with Cloudflare Pages

Name Result
Last commit: 7f9fcb5be9e17664ee0f580d28c73fefec1bcf7b
Status: ✅ Deploy successful!
Preview URL: https://e2015d4a.neoforged-docs-previews.pages.dev
PR Preview URL: https://pr-228.neoforged-docs-previews.pages.dev

Please sign in to comment.