Jump to content

Forge Data Generators not generating any data.


Slit_bodmod

Recommended Posts

Hey, I'm new to the forge data generators and was trying to get them up and running. At the moments they aren't crashing or anything but they also don't seem to be generating any data, as far as I can tell they're set up correctly and I've tried both runClient and runData and as far as I can tell they neither loaded the models correctly into the game nor output them in any files I can see. I have no real idea what I'm doing though.

so I have my main data generator class that looks a bit like this:

@Mod.EventBusSubscriber(modid = GaiaTerrainMod.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class GaiaDataManager {

	@SubscribeEvent public static void gatherData(final GatherDataEvent event) {
		GaiaTerrainMod.LOGGER.info("gathering data!");
		DataGenerator generate = event.getGenerator();
		ExistingFileHelper existingFileHelper = event.getExistingFileHelper();

		generate.addProvider(new GaiaBlockStateGenerator(generate,existingFileHelper));
		generate.addProvider(new GaiaItemModelGenerator(generate, existingFileHelper));

		GaiaBlockTagGenerator blockTags = new GaiaBlockTagGenerator(generate, existingFileHelper);
		generate.addProvider(blockTags);
		generate.addProvider(new GaiaItemTagGenerator(generate, blockTags, existingFileHelper));

		generate.addProvider(new GaiaLootTableGenerator(generate));
		generate.addProvider(new GaiaRecipeGenerator(generate));
		GaiaTerrainMod.LOGGER.info("gathered data!");
	}
}

originally it didn't have the "@Mod.EventBusSubscriber(modid = GaiaTerrainM..." line at the top and instead was only invoked through a line in the GaiaTerrainMod constructor that looked like this:

public GaiaTerrainMod() {
    IEventBus registry_bus = FMLJavaModLoadingContext.get().getModEventBus();
    registry_bus.addListener(this::setup);

    MinecraftForge.EVENT_BUS.register(this);
    MinecraftForge.EVENT_BUS.register(GaiaDataManager.class);

    ModWoodTypes.init();

    ModBlocks.BLOCKS.register(registry_bus);
    ModItems.ITEMS.register(registry_bus);
    GaiaBiomeSelector.initBiomeMappings();
}

as you can see at the start and end of my gatherData function I have logs and when I hit "runData" they fired and I could see them as the last 2 things outputted by the console, however in GaiaBlockStateGenerator, the first data provider added to my data generator, I also put 2 logs at the start and end of the overriden registerStatesAndModels() function. These never fired, I assume they should after my gatherData logs fired. Not sure though,

as far as i can tell the issue should be somewhere in these files (unless it's somewhere weird), again I'm not getting any crashes or errors just a plain old, doesn't do the thing I want it to which clearly indicates I've done something dumb somewhere.

Link to comment
Share on other sites

When you do your data run do you see "Initializing Data Gatherer for mods [examplemod]" in the logs, rather than [yourmodid]? If so, your run configurations are still wrong. Check to see if you have "--mod examplemod" in your IDE's run configs menu, and if you can't get it to update with gradle you can always change the --mod argument manually in your IDE.

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
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.

×
×
  • Create New...

Important Information

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