Skip to content

Commit

Permalink
feat(docs): Update datamaps section
Browse files Browse the repository at this point in the history
  • Loading branch information
ChampionAsh5357 committed Oct 17, 2024
1 parent 043b67b commit 8333111
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/resources/server/datamaps/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ This way, if one pack specifies the value 12 for `minecraft:carrot` and another
Finally, don't forget to actually specify the merger in the builder, like so:

```java
// We assume AdvancedData contains an integer property of some sort.
AdvancedDataMapType<Item, AdvancedData> ADVANCED_MAP = AdvancedDataMapType.builder(...)
// The types of the data map must match the type of the merger.
AdvancedDataMapType<Item, Integer> ADVANCED_MAP = AdvancedDataMapType.builder(...)
.merger(new IntMerger())
.build();
```
Expand Down Expand Up @@ -318,7 +318,7 @@ public class MyDataMapProvider extends DataMapProvider {
@Override
protected void gather() {
// We create a builder for the EXAMPLE_DATA data map and add our entries using #add.
builder(EXAMPLE_DATA)
this.builder(EXAMPLE_DATA)
// We turn on replacing. Don't ever ship a mod like this! This is purely for educational purposes.
.replace(true)
// We add the value "amount": 10, "chance": 1 for all slabs. The boolean parameter controls
Expand Down

1 comment on commit 8333111

@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: 833311185b84a56ff7e35e888fdf883c1aeae44a
Status: ✅ Deploy successful!
Preview URL: https://78f70b6d.neoforged-docs-previews.pages.dev
PR Preview URL: https://pr-178.neoforged-docs-previews.pages.dev

Please sign in to comment.