Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not creating datapacks correctly #26

Open
Cheaterpaul opened this issue Dec 8, 2024 · 2 comments
Open

Not creating datapacks correctly #26

Cheaterpaul opened this issue Dec 8, 2024 · 2 comments

Comments

@Cheaterpaul
Copy link

ProductiveTrees seems to have a dynamic datapack, that generates the resources on runtime.

Which is rather unorthodox, but to generate the new data you create a new HolderLookup.Provider, which only contains the default vanilla registry objects and no other modded one. This way the data pack generation failes to resolve id.

private static void registerDataGen() {
generator = new DataGenerator(TreeFinder.DYNAMIC_RESOURCE_PATH, SharedConstants.getCurrentVersion(), true);
CompletableFuture<HolderLookup.Provider> lookupProvider = CompletableFuture.supplyAsync(VanillaRegistries::createLookup, Util.backgroundExecutor());
TreeRegistrator.registerDatagen(generator, lookupProvider);
}

I am not sure, why productivetrees generates the resources on runtime. It looks to me like the resources could be generated beforehand and not on runtime. That way you have access to the GatherDataEvent#getLookupProvider to obtain a HolderLookup.Provider with all existing registry objects.

@JaisDK
Copy link
Contributor

JaisDK commented Dec 8, 2024

why is vampirism having a seizure with this when no other mod is?

@ItMeCorban
Copy link

ItMeCorban commented Dec 9, 2024

Experiencing a similar bug. I've added Vampirism to my Direwolf20 1.21 server and it's crashing with productivetrees. Interestingly, I can add it to version 1.4.1 of the same modpack, it only breaks with version 1.7.0.

I created a bug with vampirism as I wasn't sure where the issue was but linking it here as it seems to be productivetrees is the source.

TeamLapen/Vampirism#1460

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants