跳到正文

Booklink

作者:Floffah

将书籍与服务端文本文件双向同步!

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Booklink

This is a simple mod that allows you to synchronise in game books with text files stored on your computer. It supports single player AND servers, as long as it is installed on both the server and the client.

The mod adds two items you can craft: the Unlinked Book, and the Unlinked Book and Quill. The Unlinked Book allows you to import from text files (it will re-read the file every time you open the book). The Unlinked Book and Quill allows you to write a book in game like a normal book and quill, and when you sign it the book is saved in the booklink folder.

Books are stored in data/booklink as .txt files, relative to your save game (level name on server, saves/name on singleplayer). The books have no particular format and are basically plaintext but with the exception that you can separate manual page breaks with --- on a new line.

This mod is a personal project for one of my singleplayer world builds, I thought I’d make it public in case anyone else wished to use it. You may suggest changes, features, or report bugs on the issue tracker linked in the modrinth page

Unlinked Book

You can craft the unlinked book as below (both items are vanilla)

Unlinked Book crafting recipe

Once you’ve crafted the book, right click it and the below menu will pop up. You must write the exact file name (excluding the .txt extension)

Unlinked Book sync menu

Unlinked Book and Quill

You can craft the unlinked book and quill as below (both items are vanilla EXCEPT the use of an unlinked book as a base)

Unlinked Book and Quill crafting recipe
Unlinked Book and Quill crafting recipe showing the Unlinked Book in there

When you open the book and quill, it will act exactly like a regular book and quill, allowing you to write content.

Unlinked Book and Quill edit page

When you sign the book, the name you use is used as the file name. The name will however be normalised, so the use of punctuation may vary on operating system. For example, “My Book!” will be saved as my-book.txt. It will however be parsed back properly, but my-book.txt will read as “My Book” obviously losing the punctuation

Unlinked Book and Quill edit page

Sign it and you will be given a book that is linked to the file in your savegame. Note that you may make changes to the text file and next time you open the book in game, you will see the changes!

Linked Book preview
the saved file

Compatibilities

Booklink is not compatible with any other mods on purpose, BUT it has been tested with mods such as:

  • Scribble (mod that adds text formatting and colours to books)

See below an unlinked book and quill and linked book that both support Scribble’s colours which saved properly

Unlinked Book and Quill with Scribble formatting
Linked Book with saved Scribble formatting

As you can see, we retained formatting but also see below the saved text file

Book file saved with Scribble formatting

Moral of the story here is that if any formatting mod uses builtin or text-based formatting, it will work with Booklink. The only exception to this rule is if your formatting mod uses --- to separate lines.

常见问题

Booklink 支持哪些 Minecraft 版本?

Booklink 支持 Minecraft Java 版 1.21.1,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。

Booklink 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。

评论

登录后评论和评分