Patchouli

Patchouli

167M Downloads

Extend existing book entries instead of overwriting them.

Lgmrszd opened this issue ยท 1 comments

commented

Describe the feature

Right now, with resourcepack-based books, you can extend them by adding new categories and entries. But it's impossible to add pages to existing entry. Would be neat if there was such a possibility.

Additional context

Use-case: base mod that have upgrades described in one entry on separate pages, and addon mod that adds it's own upgrade, instead of adding separate entry it would be possible to add a page to existing entry.

commented

I like the idea.

Maybe it could be possible if the pages key accepted Objects instead of an Object Array. It allows a page to be replaced if a resourcepack entry uses the same page key and to be added to if it uses an unique page key.
And as a bonus it's key would become and anchor.

But I'm not sure if the devs would like make that change.

Example

Instead of:

{
  "pages": [
    {
        "type": "patchouli:text",
        "text": "book.patchouli.text",
        "anchor": "first_page"
    }
  ]
}

Could be:

{
  "pages": {
    "first_page": {
        "type": "patchouli:text",
        "text": "book.patchouli.text"
    }
  }
}