Jump to content

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


Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted

Yes, Sir. Things not working makes one blind of hair tearing rage. Hence why I overlooked the fact, I hadn't imported the EventSubscriber to the main file.

Can one not just import the old version to the new project without fing up? Doing it file by file is quite tedious.

Posted

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.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.