Skip to content

Merge Adapter | Book Meta

WolfyScript edited this page Jan 4, 2023 · 3 revisions

Key: customcrafting:book
Version: v4.16.5+

Properties

Page Options

  • copyPages :

    Required option to copy pages from the target to the result.
    default: false

  • replacePages :

    Replaces the pages of the result item when enabled; otherwise appends it to the pages of the result.
    default: false

  • insertAtPage :

    Specifies where to insert the target pages into the result pages.
    default: after last page

  • pages :

    Specifies the page data that should be included. Either by index or value.
    default: []

    • value :

      Checks if the value is in the targets' page and adds it.
      default: null

    • index :

      Adds the page at the specified index and adds it.
      default: null

    • condition :

      A custom boolean operation to check if the value should be included.
      default: true

  • extraPages :

    Additional Pages that are always added to the result.
    default: []

  • addExtraPagesFirst :

    When enabled, adds the extra lines before copying the pages; otherwise afterwards.
    default: false

Title Options

  • copyTitle :

    Required to copy the title of the target to the result.
    default: false

  • replaceTitle :

    Replaces the title of the result. Otherwise, appends the target title it to the result title.
    default: false

  • titlePrefix :

    Prefix to be added to the target title.
    default: ""

  • titleSuffix :

    Suffix to be added to the target title.
    default: ""

Author Options

  • copyAuthor :

    Required to copy the author of the target to the result.
    default: false

  • replaceAuthor :

    Replaces the author of the result. Otherwise, appends the target author to the result title.
    default: false

  • authorPrefix :

    Prefix to be added to the target author.
    default: ""

  • authorSuffix :

    Suffix to be added to the target author.
    default: ""

Generation Options

  • copyGeneration :

    Required to copy the generation type of the target to the result.
    default: false

  • changeGenerationTo :

    Changes the result generation type to the one specified. (Only when copyGeneration is set to false!)
    default: null

Examples

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

{
  key: "customcrafting:book",
  copyPages: true,
  pages: [
    {
      value: "<grey>The page contents</grey>"
    }
  ]
}

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

{
  key: "customcrafting:book",
  copyPages: true,
  pages: [
    {
      index: 0 // Note: if the index is bigger/smaller than the amount of pages, then it wraps around.
               // Tip: negative indexes start from the end of the page list.
    }
  ]
}

Add all target pages to the result:

{
  key: "customcrafting:book",
  copyPages: true,
  lines: [
    { } // Condition is true by default, and matches each page
  ]
}

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

{
  key: "customcrafting:book",
  copyPages: true,
  insertAtPage: 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