Skip to content

Merge Adapter | Display Lore

WolfyScript edited this page Dec 17, 2022 · 5 revisions

Key: customcrafting:display_lore
Version: v4.16.4+

Properties

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)

Examples

Take a specific lore from an item and add it to the result:

{
  key: "customcrafting:display_lore",
  lines: [
    {
      value: {
        key: "string/const",
        value: "<grey>Special Enchant IV</grey>"
      }
    }
  ]
}

Get the first line from the target and add it to the result:

{
  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.
    }
  ]
}

Add all target lines to the result:

{
  key: "customcrafting:display_lore",
  lines: [
    { } // Condition is true by default, and matches each line
  ]
}

Take the first and last target line and add it to the beginning

{
  key: "customcrafting:display_lore",
  insertAtIndex: 0,
  lines: [
    {
      index: 0
    },
    {
      index: -1
    }
  ]
}

| Home

  • Editions
  • Installation

| General

  • Performance
  • Terminology

| Recipes

Types

  • From 1.6.5.x
  • From 1.6.4.0
  • From 1.6.3.0 or older

| Special Workstations

  • Custom Recipe Book
  • Vanilla Recipe Book
Clone this wiki locally