-
Notifications
You must be signed in to change notification settings - Fork 2
JSON Serializers
These are some standard serializers used in Lore Expansion noted down for reference.
{
"id": "foo",
"category": "bar"
}
Category can be a language key. It will be localized whenever drawn.
{
"title": "foobar",
"body": "My foobar brings all the boys to the yard.",
"audio": "",
"autoplay": false
}
Field | Description |
---|---|
title |
Title of this Lore. Displayed at the top of the right page when selected and in the hovering tooltip on the left page. Can be a language key. Will be localized when drawn. Required |
body |
Body text of this Lore. Displayed on the right page when selected. Can be a language key. Will be localized when drawn. Required |
audio |
Name of the audio file to play. Audio files are loaded from ../config/loreexpansion/lore/audio/ and must be of the .ogg format. A value of example will play example.ogg . Optional - Default ""
|
autoplay |
If an audio value is set, this will cause it to play as soon as the Player receives the Lore. Optional - Default false . |
{
"domain": "foo",
"path": "bar"
}
{
"triggerId": ResourceLocation,
"target": { ... }
}
Field | Description |
---|---|
triggerId |
See the ResourceLocation serializer. Required |
target |
Changes based on the triggerId . See the Lore Triggers section for more information. Required
|
{
"actionId": ResourceLocation,
"data": { ... }
}
Field | Description |
---|---|
actionId |
See the ResourceLocation serializer. Required |
data |
Changes based on the actionId . See the Lore Actions section for more information. Required
|
{
"id": "foo.bar"
}
To find the string to use for id
, use tab completion on the /achievement
command. It will list the ID of all registered achievements. eg: achievement.openInventory
for "Taking Inventory".
{
"xPos": 0,
"yPos": 0,
"zPos": 0
}
{
"id": ResourceLocation,
"amount": 1,
"meta": 0,
"nbt": ""
}
Field | Description |
---|---|
id |
See the ResourceLocation serializer. Required |
|
| amount
| The amount of this item. Optional - Default 1
|
| meta
| The damage value of this item. Optional - Default 0
|
| nbt
| An NBT Tag to set for this item. Uses the Vanilla Minecraft NBT String format. It is essentially one large String of JSON. Optional - Default ""
|