tutorial:datagen_setup
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorial:datagen_setup [2023/09/29 07:44] – jmanc3 | tutorial:datagen_setup [2024/03/15 05:06] (current) – shnupbups | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Getting started with Data Generation ====== | ====== Getting started with Data Generation ====== | ||
- | Data Generation is a of Fabric API which allows you to programmatically generate Recipes, Language Files, Loot Tables, Advancements and pretty much anything with Custom Providers. Every time you modify the code that generates advancements (or anything else datagen can make like loot tables and such) you'll have to run the gradle task '' | + | Data Generation is a module |
===== Enabling Data Generation ===== | ===== Enabling Data Generation ===== | ||
Line 15: | Line 15: | ||
First open up your '' | First open up your '' | ||
- | <code groovy gradle.build | + | <code groovy |
// | // | ||
Line 21: | Line 21: | ||
// | // | ||
- | sourceSets | + | fabricApi |
- | | + | |
- | resources { | + | |
- | srcDirs += [ | + | |
- | ' | + | |
- | ] | + | |
- | } | + | |
- | } | + | |
} | } | ||
- | </ | ||
- | |||
- | Next find the '' | ||
- | |||
- | <code groovy gradle.build [highlight_lines_extra=" | ||
- | |||
- | // | ||
- | // ... (The rest of the file) | ||
- | // | ||
- | |||
- | loom { | ||
- | |||
- | // ... (Whatever exists here) | ||
- | |||
- | runs { | ||
- | // This adds a new gradle task that runs the datagen API: " | ||
- | datagen { | ||
- | inherit server | ||
- | name "Data Generation" | ||
- | vmArg " | ||
- | vmArg " | ||
- | vmArg " | ||
- | |||
- | runDir " | ||
- | } | ||
- | } | ||
- | } | ||
- | |||
- | // ... (The rest of the file) | ||
- | |||
- | </ | ||
- | |||
- | * NOTE: You may have to change the line '' | ||
- | |||
- | You'll notice the code we just added to the '' | ||
- | |||
- | <code properties gradle.properties> | ||
- | // .. (The rest of the file) | ||
- | |||
- | modid=the-name-of-your-mod-change-me-please | ||
- | |||
- | // .. (The rest of the file) | ||
</ | </ | ||
Line 163: | Line 115: | ||
Firstly, inside your '' | Firstly, inside your '' | ||
- | //If you want, you can place this class in a seperate | + | //If you want, you can place this class in a separate |
<code java> | <code java> |
tutorial/datagen_setup.1695973471.txt.gz · Last modified: 2023/09/29 07:44 by jmanc3