Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.16.5]Data Generator Run Configuration = All providers took: 0 ms


Cratthorax
 Share

Recommended Posts

Good day,

updating went pretty straight forward, due to the fact that most code lines in .classes were to be found almost exactly in the same spot as in 1.16.4.

However, I do have one issue left, and I'm right now tearing my hair out in order to figure how to solve it. Trying to run my Data Generator Configuration in Eclipse, does execute like it is supposed to, but only it will always return 0 data files provided when the config run is done. I scanned the log for errors, and differences to the way I did it in 1.16.4, but I made absolutely sure(for the last fing 4 hours) everything is just fine an dandy with my run config. I do notice two differences though, and I'm afraid it comes down to those two things why it simply doesn't forward the data generation. Unfortunately I don't know how to change specially number 1.

1. in my run data configuration, under "Environment", in 1.16.4 there are no entry's for "assetDirectory" and "assetIndex", while in 1.16.5 they do exist, as well as for the "normal" run configuration(the game, not the data generation config). They do ALSO not exist for my second mod's Data Generation run config. See this screenshot:

comparison-Run-Config.jpg

Notice when trying to remove the asset entry's from the newer run config, it will simply crash.

2. in my 1.16.5 build.gradle, under "buildscript", just in the beginning, the entry "jcenter()" is missing.

I hope someone can help me here. Thanks.

Edited by Cratthorax
Link to comment
Share on other sites

Found the solution. It appears the registration method has changed. I was registering the Data Gen Main File, in my Mods Main File before. Now you add the EventBusSubscriber directly to your Data Generator main file like this:

@Mod.EventBusSubscriber(modid = MatLibMain.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
public final class DataGenMain {
	
    private DataGenMain() {}

    @SubscribeEvent
    public static void gatherData(GatherDataEvent event) {
    	
        DataGenerator gen = event.getGenerator(); 
        ExistingFileHelper existingFileHelper = event.getExistingFileHelper();
        
        DataGenBTP blockTags = new DataGenBTP(gen, existingFileHelper);
        gen.addProvider(blockTags);
        gen.addProvider(new DataGenITP(gen, blockTags, existingFileHelper));
        
        gen.addProvider(new DataGenFTP(gen, existingFileHelper));
        gen.addProvider(new DataGenLT(gen));
    }
}

Edit: correction. In 1.16.4 there wasn't even a EventSubscriber needed. It did that automatically for you.

Edited by Cratthorax
Link to comment
Share on other sites

16 minutes ago, Cratthorax said:

It appears the registration method has changed.

16 minutes ago, Cratthorax said:

correction. In 1.16.4 there wasn't even a EventSubscriber needed. It did that automatically for you.

Incorrect. Nothing about this has changed from 1.16.4 to 1.16.5. GatherDataEvent was always the way you registered your data generators and nothing about this has changed. How you register your event handler is irrelevant to this.

 

Link to comment
Share on other sites

Thank you, found it, but according to the description it's somewhat risky to use? That's partially because of the sentence "no automatic backup", and my layman Java skills, which restrict me from even understanding how, and specially WHERE to install it? Is this supposed to go in the build.gradle? And if so, where exactly?

"...add them to the remapping tasks"

I don't understand what he means by remapping tasks? In the minecraft, or in the dependencies section? I assume in the dependencies section where it says...

"minecraft 'net.minecraftforge:forge:1.16.4-35.1.4'"

...?

Thanks for your repeated time and patience btw.

Link to comment
Share on other sites

6 hours ago, Cratthorax said:

That's partially because of the sentence "no automatic backup"

Well, it is kind of assumed that you have a backup of your code already. Ideally you should be using Git.

6 hours ago, Cratthorax said:

"...add them to the remapping tasks"

This in the section about additional source sets. Are you using additional source sets? I doubt it, given your presented knowledge about Gradle.

6 hours ago, Cratthorax said:

specially WHERE to install it? Is this supposed to go in the build.gradle? And if so, where exactly?

It tells you the command you need to run, literally ready to copy-paste.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.