You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started/step-by-step-with-datapack/step-by-step-with-datapack.md
+2-16Lines changed: 2 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ sidebar_position: 10
4
4
5
5
# Step by Step Guide for a Book via Datapack
6
6
7
-
This page will guide you through a reasonably easy way to create a book _without_ datagen.
7
+
This section will guide you through a reasonably easy way to create a book _without_ datagen.
8
8
It uses the [Demo Book](https://github.com/klikli-dev/modonomicon/tree/HEAD/neo/src/generated/resources/data/modonomicon/modonomicon/books) modonomicon provides as a starting point.
9
9
10
10
:::tip
@@ -17,18 +17,4 @@ If you run into any issues or have any questions, join our Discord: **https://ds
17
17
18
18
It is not recommended to manually create books. It is much more convenient and error-free to use [datagen](../step-by-step-with-datagen/). JSON is not a great format for text editing, and can be annoying to properly format text.
19
19
20
-
:::
21
-
22
-
23
-
The best approach is to create a datapack from the demo book, and then modify and extend it to your needs. This saves you a lot of time and effort in manually creating a valid file structure for your book.
24
-
25
-
:::tip
26
-
27
-
If you are already well-versed with datapacks you can look at the demo book **[here](https://github.com/klikli-dev/modonomicon/tree/HEAD/neo/src/generated/resources/data/modonomicon/modonomicon/books)** and the demo multiblocks used by the book **[here](https://github.com/klikli-dev/modonomicon/tree/HEAD/neo/src/generated/resources/data/modonomicon/modonomicon/multiblocks)** and simply download the individual files you want to use as a reference.
28
-
29
-
:::
30
-
31
-
First, download the modonomicon source code, as it contains the demo book:
32
-
1. Start by visiting https://github.com/klikli-dev/modonomicon
33
-
2. Find the green "Code" button and click it. Then click "Download ZIP" at the bottom of the dropdown menu.
34
-
3. Extract the ZIP file to a location of your choice.
1. Set up a folder structure as required by minecraft: https://minecraft.wiki/w/Data_pack#Folder_structure.
8
-
1. You do not need to create all the subfolders of the `data` folder, you can keep `data` empty in the first step.
9
-
10
-
2. Now create a folder for your namespace. Usually your namespace is your mod id or modpack id (e.g. the modpack name in all lowercase with no spaces) (See also https://minecraft.wiki/w/Resource_location#Namespaces)
7
+
The best approach to creating a book as a datapack (as opposed to [datagen](../step-by-step-with-datagen/)) is to create a datapack from the demo book, and then modify and extend it to your needs. This saves you a lot of time and effort in manually creating a valid file structure for your book.
11
8
12
-
3. In your namespace folder, create a folder `/modonomicon/`.
9
+
First, download the modonomicon source code, as it contains the demo book:
10
+
1. Start by visiting https://github.com/klikli-dev/modonomicon
11
+
2. Find the green "Code" button and click it. Then click "Download ZIP" at the bottom of the dropdown menu.
12
+
3. Extract the ZIP file to a location of your choice.
13
+
4. Remember where you extracted the files, you will need them in a future step.
13
14
14
-
4. In the `/modonomicon/` folder, create a folder `/books/` and `/multiblocks/`:
15
-
:::info
16
-
If you do not plan on having any multiblocks or multiblock pages, you can skip the `/multiblocks/` folder.
17
-
:::
15
+
:::tip
16
+
17
+
If you are already well-versed with datapacks you can look at the demo book **[here](https://github.com/klikli-dev/modonomicon/tree/HEAD/neo/src/generated/resources/data/modonomicon/modonomicon/books)** and the demo multiblocks used by the book **[here](https://github.com/klikli-dev/modonomicon/tree/HEAD/neo/src/generated/resources/data/modonomicon/modonomicon/multiblocks)** and simply download the individual files you want to use as a reference.
1. Set up a folder structure as required by minecraft: https://minecraft.wiki/w/Data_pack#Folder_structure.
8
+
1. You do not need to create all the subfolders of the `data` folder, you can keep `data` empty in the first step.
9
+
10
+
2. Now create a folder for your namespace. Usually your namespace is your mod id or modpack id (e.g. the modpack name in all lowercase with no spaces) (See also https://minecraft.wiki/w/Resource_location#Namespaces)
7
11
8
-
1. In your file explorer go to the folder you extracted and then into `<extracted_folder>\neo\src\generated\resources\data\modonomicon\modonomicon\books\`.
12
+
3. In your namespace folder, create a folder `/modonomicon/`.
9
13
10
-
2. Copy the `demo` folder (or if you want to make a leaflet, the `demo_leaflet` folder) and paste it in your datapack's `/modonomicon/books/` folder.
11
-
12
-
3. In your file explorer go to the folder you extracted and then into `<extracted_folder>\neo\src\generated\resources\data\modonomicon\modonomicon\multiblocks\`.
13
-
14
-
4. Copy all `.json` files and paste them in your datapack's `/modonomicon/multiblocks/` folder.
15
-
:::info
16
-
If you do not plan on having any multiblocks or multiblock pages, you can skip copying the contents of the `/multiblocks/` folder.
17
-
:::
18
-
19
-
5. If you **did not** set up multiblocks, go into your datapack folder `<your datapack>/data/<your namespace>/modonomicon/books/demo/entries/features/` and **delete** the `multiblock.json` file.
14
+
4. In the `/modonomicon/` folder, create a folder `/books/` and `/multiblocks/`:
20
15
:::info
21
-
If you do not delete that file, this multiblock entry will look for the multiblocks in the `/multiblocks/` folder and will throw an error if it does not find them.
22
-
:::
16
+
If you do not plan on having any multiblocks or multiblock pages, you can skip the `/multiblocks/` folder.
You can now test your datapack in game. An item named `book.modonomicon.demo.name` should be available in the Modonomicon creative tab and JEI/REI/EMI.
8
7
9
-
When you first open the book, it will not have proper texts instead it will have contents like `book.modonomicon.demo.features.spotlight.description`.
10
-
11
-
Both the weird book name and weird content texts happen because the demo book uses the minecraft translation system. You can either create a resource pack with a language file (you can copy individual lines or the entire file from https://github.com/klikli-dev/modonomicon/blob/version/1.21.1/neo/src/generated/resources/assets/modonomicon/lang/en_us.json), or you can directly type your desired text in the json files.
8
+
1. In your file explorer go to the folder you extracted and then into `<extracted_folder>\neo\src\generated\resources\data\modonomicon\modonomicon\books\`.
12
9
13
-
:::tip
14
-
It is recommended to use the translation system, otherwise it is impossible for others to translate your book.
15
-
:::
10
+
2. Copy the `demo` folder (or if you want to make a leaflet, the `demo_leaflet` folder) and paste it in your datapack's `/modonomicon/books/` folder.
16
11
17
-
**You can now edit the demo book to your liking to make your own book**.
18
-
Reference the [Basics](../../basics/) and [Advanced](../../advanced/) sections to learn about the valid JSON keys and structures.
12
+
3. In your file explorer go to the folder you extracted and then into `<extracted_folder>\neo\src\generated\resources\data\modonomicon\modonomicon\multiblocks\`.
13
+
14
+
4. Copy all `.json` files and paste them in your datapack's `/modonomicon/multiblocks/` folder.
15
+
:::info
16
+
If you do not plan on having any multiblocks or multiblock pages, you can skip copying the contents of the `/multiblocks/` folder.
17
+
:::
18
+
19
+
5. If you **did not** set up multiblocks, go into your datapack folder `<your datapack>/data/<your namespace>/modonomicon/books/demo/entries/features/` and **delete** the `multiblock.json` file.
20
+
:::info
21
+
If you do not delete that file, this multiblock entry will look for the multiblocks in the `/multiblocks/` folder and will throw an error if it does not find them.
You can now test your datapack in game. An item named `book.modonomicon.demo.name` should be available in the Modonomicon creative tab and JEI/REI/EMI.
8
+
9
+
When you first open the book, it will not have proper texts instead it will have contents like `book.modonomicon.demo.features.spotlight.description`.
10
+
11
+
Both the weird book name and weird content texts happen because the demo book uses the minecraft translation system. You can either create a resource pack with a language file (you can copy individual lines or the entire file from https://github.com/klikli-dev/modonomicon/blob/version/1.21.1/neo/src/generated/resources/assets/modonomicon/lang/en_us.json), or you can directly type your desired text in the json files.
12
+
13
+
:::tip
14
+
It is recommended to use the translation system, otherwise it is impossible for others to translate your book.
15
+
:::
16
+
17
+
**You can now edit the demo book to your liking to make your own book**.
18
+
Reference the [Basics](../../basics/) and [Advanced](../../advanced/) sections to learn about the valid JSON keys and structures.
0 commit comments