Skip to content

Commit

Permalink
Update index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Jan 26, 2024
1 parent c005ede commit 69c7b16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/datamaps/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ The default merger (`DataMapValueMerger#defaultMerger`) has the typical behaviou
An advanced data map can provide a `DataMapValueRemover` through `AdvancedDataMapType#remover`. The remover will allow selective removals of data map values, effectively decomposition.
While by default a datapack can only remove the whole object attached to a registry entry, with a remover it can remove just speciffic values from the attached object (i.e. just the entry with a given key in the case of a map, or the entry with a specific property in the case of a list).
The codec that is passed to the builder will decode removers that will then be given the value currently attached and its source, and is expected to create a new object that will have the properties requested by the `remove` object removed. Alternatively, an empty `Optional` will lead to the value being completely removed.
The codec that is passed to the builder will decode remover instances. These removers will then be given the value currently attached and its source, and are expected to create a new object to replace the old value.
Alternatively, an empty `Optional` will lead to the value being completely removed.
An example of a remover that will remove a value with a specific key from a `Map`-based data map:
```java
Expand Down

1 comment on commit 69c7b16

@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: 69c7b16d6959e435ec5d20d6079b89717f494692
Status: ✅ Deploy successful!
Preview URL: https://289bfcb7.neoforged-docs-previews.pages.dev
PR Preview URL: https://pr-46.neoforged-docs-previews.pages.dev

Please sign in to comment.