Dariensg / Hellions-Sniffer-Plus

Apache License 2.0
4 stars 7 forks source link

Datagen Failure with Sniffer+ #5

Closed xanthian closed 3 months ago

xanthian commented 1 year ago

I'm trying to create compatability for Sniffer+ in a number of my 'Variant' style mods,

I've added Sniffer+ to build.gradle modImplementation("curse.maven:hellionssiffer-871962:4591532")

Error log states :

Caused by: java.lang.IllegalStateException: Errors during registry creation Suppressed: java.lang.IllegalStateException: Unreferenced key: ResourceKey[minecraft:worldgen/biome / snifferplus:timeless_grotto] at net.minecraft.registry.RegistryBuilder$Registries.validateReferences(RegistryBuilder.java:128) ~[minecraft-merged-project-root-1.20.1-net.fabricmc.yarn.1_20_1.1.20.1+build.9-v2.jar:?] at net.minecraft.registry.RegistryBuilder.createWrapperLookup(RegistryBuilder.java:268) ~[minecraft-merged-project-root-1.20.1-net.fabricmc.yarn.1_20_1.1.20.1+build.9-v2.jar:?] at net.fabricmc.fabric.impl.datagen.FabricDataGenHelper.createRegistryWrapper(FabricDataGenHelper.java:194) ~[fabric-data-generation-api-v1-12.1.12+b3afc78b77.jar:?] at net.fabricmc.fabric.impl.datagen.FabricDataGenHelper.lambda$runInternal$0(FabricDataGenHelper.java:108) ~[fabric-data-generation-api-v1-12.1.12+b3afc78b77.jar:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]

If i remove the Sniffer+ implementation from Gradle my datagen runs perfectly fine. Link to 1 of my mods with gradle setup https://github.com/xanthian/variantcraftingtables/tree/1.20

Dariensg commented 1 year ago

Hmmm... Datagen is still pretty new to me and I've never implemented it myself, so I'm not entirely sure here. My best guess is that, since I use JSON biomes for the Timeless Grotto, your datagen is picking up on the fact that the key exists, but is confused that it doesn't exist anywhere in code. I'm not too sure how you'd get around this or that it's really what's happening, but that's my gut reaction. I'd have to go through a bit more closely to confirm 100% that the Timeless Grotto resource key never shows up in code, but a quick glance through the relevant packages turned up nothing. I'm not sure how you'd get around this, however, but you'd probably know better than I since you seem to have worked with datagen quite a bit. Happy to continue discussing this until we can figure it out!

xanthian commented 1 year ago

Hi, thanks for replying! I'm far far from a datagen expert, only decided to adopt it in 1.20.x this is probably maybe 5th mod using it. But its the 1st time I've required to implement other mods I'm wanting to add compatibility for. The recipe and model datagen require the block/item from the mod source to generate the files, so implementation is required. If it was a string value none of this would be an issue!! I've not worked with biomes before, so i'm clueless on this.

Dariensg commented 1 year ago

Every block in the mod definitely has an in-code implementation. The only thing I can think of that shouldn't is the biome, as the error here seems to indicate, and some of the features used in that biome. I'd say this may actually be a question for the Fabric team. They would probably be able to answer it better than I can, since they most likely have a better sense of how their datagen is working. Here is their Discord. Let me know if I can help with anything else!

xanthian commented 1 year ago

Raised it on Fabric Git but it got closed.. https://github.com/FabricMC/fabric/issues/3199 no clue..

Dariensg commented 1 year ago

Yeah, Git is for issues typically, not support. As their bot said, it's better suited for a discussion thread or their discord, which is why I linked their discord.