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 [2025/03/25 00:41] (current) – [IDE Integration (Optional)] removed the section solidblock | ||
---|---|---|---|
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 '' | + | If you're using version 1.21.4 or above, please replace |
- | <code groovy | + | <code groovy> |
- | + | fabricApi | |
- | // | + | |
- | // ... (The rest of the file) | + | |
- | // | + | |
- | + | ||
- | loom { | + | |
- | + | ||
- | | + | |
- | + | ||
- | runs { | + | |
- | | + | |
- | 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 138: | Line 100: | ||
There should be a new folder in '' | There should be a new folder in '' | ||
- | ==== IDE Integration (Optional) ==== | ||
- | |||
- | Because we don't want to be opening the terminal all the time, we can setup a configuration in '' | ||
- | |||
- | First open the '' | ||
- | |||
- | Next click the '' | ||
- | |||
- | Inside the '' | ||
====== Adding Providers ====== | ====== Adding Providers ====== | ||
Line 163: | Line 116: | ||
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