Merge Adapter | Display Lore - WolfyScript/CustomCrafting GitHub Wiki
Key: customcrafting:display_lore
Version: v4.16.4+
replaceLore - Replaces the lore of the result item when enabled; otherwise appends it to the lore.
(default: false)
insertAtIndex - Specifies where to insert the target values into the result lore.
(default: end of lore)
lines - Specifies the line data that should be included. Either by index or value.
(default: [])
-
value- Checks if the value is in the targets' lore and adds it to the resulting lore.
(default:null) -
index- Adds the value at the specified index and adds it to the lore.
(default:null) -
condition- A custom boolean operation to check if the value should be included.
(default:true)
extra - The extra lore that is always added to the result.
(default: [])
addExtraFirst - When enabled, adds the extra lines before merging the target lines; otherwise afterwards.
(default: false)
{
key: "customcrafting:display_lore",
lines: [
{
value: {
key: "string/const",
value: "<grey>Special Enchant IV</grey>"
}
}
]
}{
key: "customcrafting:display_lore",
lines: [
{
index: 0 // Note: if the index is bigger/smaller than the lore size it wraps around.
// Tip: negative indexes start from the end of the lore.
}
]
}{
key: "customcrafting:display_lore",
lines: [
{ } // Condition is true by default, and matches each line
]
}{
key: "customcrafting:display_lore",
insertAtIndex: 0,
lines: [
{
index: 0
},
{
index: -1
}
]
}