Skip to content

Commit 2807ff6

Browse files
committed
add note about mc's built-in component serializer
1 parent 7877d0a commit 2807ff6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ The `embedComponent` can be parsed back from json with [Kyori Adventure](https:/
4545
Component c = GsonComponentSerializer.gson().deserialize(embedComponent);
4646
```
4747

48+
Or with Minecraft's text components:
49+
```java
50+
// MC 1.21.1 mojmap
51+
MutableComponent component = Component.Serializer.fromJson(response.embedComponent(), Minecraft.getInstance().player.registryAccess());
52+
```
53+
4854
### Example
4955

5056
```bash

0 commit comments

Comments
 (0)