HomeJavaModsGuidebook.md
Guidebook.md
ModsJava

Guidebook.md

by Garkatron · on Modrinth

Add Markdown guides to BTA, allowing modders to efficiently create and format guides. Markdown books were added to BTA, allowing users to create, edit…

⬇ Download on Modrinth
Guidebook.md — screenshot 1Guidebook.md — screenshot 2Guidebook.md — screenshot 3Guidebook.md — screenshot 4Guidebook.md — screenshot 5

Guidebook.md

Helps BTA modders create mod guides quickly and easily using Markdown with extra features

How to Use?
Create a MDBookScreen inherited class. Load config from asset path, include .md files.
Use as a normal screen, opened from a trigger.

Formats

Use < & > chars for color codes:

- 0 = &0Black
- 1 = &1Dark Blue
- 2 = &2Dark Green
- 3 = &3Dark Aqua
- 4 = &4Dark Red
- 5 = &5Dark Purple
- 6 = &6Gold
- 7 = &7Gray
- 8 = &8Dark Gray
- 9 = &9Blue
- a = &aGreen
- b = &bAqua
- c = &cRed
- d = &dLight Purple
- e = &eYellow
- f = &fWhite
- s = &sShadow
- r = Reset

Syntax

Regular &3Markdown syntax adapted for &6BTA Guidebook format:
# H1
## H2
### H3
#### H4
##### H5
###### H6
* Unordered List
- Unordered List
1. Ordered List

Specials

**Images**
- [text](/assets/modid/textures/path/to/img.png)(width,height,type)
- ![slot](modid:item/name)
- ![workbench](empty,empty,empty,empty,empty,empty,empty,empty,empty, empty)

How to use?

Markdown guidebook

public class MyBook extends MarkdownGuidebook<MDPage> {

    public IntroBook() {
        String path = "/assets/modid/markdown/mybook/";
        config = BookConfig.fromJsonResource(getClass(), path + "config.json");

        DecimalFormat formatter = new DecimalFormat("000");
        for (int i = 0; i<11; i++) {
            String fileName = "page_" + formatter.format(i + 1) + ".md";

            loadMarkdownPages(path + fileName);
        }
    }
}

Display markdown

Check superclass for more info.

public class MyMDScreen extends MDScreen {
    public MyMDScreen() {
        currentPage = MarkdownCompiler.compile("/assets/modid/markdown/path/to/your/file.md", getClass());
    }
}

In-Game Markdown Editor

Use the editable book in-game and export the Markdown content to use in your project! Or use it to share information with your friends in your world!

imageimage

Commands

Export or load markdown books.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more