User Tools

Site Tools


fr:tutoriel:data-generator-introduction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
fr:tutoriel:data-generator-introduction [2021/12/24 18:56] mysterious_devfr:tutoriel:data-generator-introduction [2021/12/24 22:16] (current) – external edit 127.0.0.1
Line 6: Line 6:
  
 ==== build.gradle ==== ==== build.gradle ====
 +
 +<code java>
 +sourceSets {
 + main{
 + resources {
 + srcDirs += [
 + 'src/main/generated'
 + ]
 + }
 + }
 +}
 +
 +loom {
 + runs {
 + datagen {
 + server()
 +
 + name "Minecraft Data"
 + vmArg "-Dfabric-api.datagen"
 + vmArg "-Dfabric-api.datagen.output-dir=${file("src/main/generated")}"
 +
 + runDir "build/datagen"
 + }
 + }
 +}
 +assemble.dependsOn runDatagen
 +</code>
 +
 +==== Classe principale pour les Data Generators ====
 +
 +<code java>
 +public class ExampleDataMod implements DataGeneratorEntrypoint {
 +    @Override
 +    public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) {
 +    
 +    }
 +}
 +
 +</code>
 +
 +==== fabric.mod.json ====
 +
 +<code json>
 +"fabric-datagen" : [
 +    "fr.mysteriousdev.gen_mod_fabric.data.ExampleDataMod"
 +]
 +</code>
  
 **[WIP]** **[WIP]**
  
  
fr/tutoriel/data-generator-introduction.1640372214.txt.gz · Last modified: 2021/12/24 18:56 by mysterious_dev