Croptopia

Croptopia

30M Downloads

Phytogenic Insulator Recipes

BrekiTomasson opened this issue ยท 3 comments

commented

The Phytogenic Insulator recipes added in v1.4.0 are creating warnings in the log if you don't have Thermal Series installed, as Minecraft tries to parse the JSON files but is unable to recognize that particular recipe type. While this isn't an error per se, it is a fairly bad coding practice to use recipe types that depend on other mods being installed if they are not a hard dependency.

May I suggest you add these recipes through the Java code instead? Then you can wrap them in an "If this mod is installed, define these recipes" to avoid any issues. I can PR it for you on the Fabric side if you need any help, although it feels kind of pointless considering Thermal Series doesn't even exist in Fabric.

commented

Understandable, I wouldn't want to try to maintain a mod for both platforms if I could avoid it. Have you looked into Architectury as a way of simplifying management of Fabric/Forge in the same repo? I know it's tricky to migrate an existing mod into Architectury compared to writing one from scratch, but it might be worth looking into. It could save you some time spent on headaches like this.

Either way, adding recipes that use a type from an external mod is still a bad idea, since Minecraft tries to load the recipe and errors out when the recipetype can't be found.

commented

I have not looked into Architectury, no. Perhaps I should.

In Forge's relatively undocumented state, I did find that you can actually define conditions for recipes in which they will be loaded.
https://github.com/ExcessiveAmountsOfZombies/Croptopia/blob/master/forge/src/main/resources/data/croptopia/recipes/te_insolator/insolator_artichoke.json

"conditions": [
    {
      "type": "forge:mod_loaded",
      "modid": "thermal_expansion"
    }
  ],

so the issue is actually mitigated with that.

commented

Based on your comment from the other issue I guess you built from source, because the jar I posted does not have the TE recipes. To avoid this if you build forge or fabric you will want to run gradlew clean to keep things that should be in one jar separate from the other. I can add this to the readme too.

It's an incredibly cursed build system but I didn't want to make two github repos for different platforms of the mod.