MrCrayfish's Furniture Mod

MrCrayfish's Furniture Mod

88M Downloads

CFM API?

SanjivanM opened this issue ยท 17 comments

commented

First off, I don't really know where to put this, but when I go to the Recipe API page on your site, and scroll down to the Download links for the API, I get a [an error occurred while processing this directive] when I click on them, and I can't really seem to find a JAR file for the API, which I need for a mod I'm upgrading.

commented

You don't need the API anymore, use datapacks in your mod.

commented

is there a tutorial for 1.12.2 that I could use?

commented

how do I implement datapacks into my 1.12.2 mod?

commented

Could I at least get a tutorial link for creating datapacks for mods?

commented

As of 1st January, 1.12.2 is not supported for modding anymore. Update at least to 1.14.4 to receive any support.

commented

Datapacks aren't only for mods. Anyway, here's a tutorial from Minecraft Wiki: https://minecraft.gamepedia.com/Tutorials/Creating_a_data_pack

commented

So I went through the tutorial, and I get that datapacks can be made for mods too, but how do I integrate it into a mod? just package the datapack folder into the root directory of my mod?

commented

Although datapacks is only for 1.14+, but not for 1.12.2

commented

You have to create a "data"(without quotes) folder in src\main\resources and in that folder create another folder that has your modid. Ex. My modid is "mtm". After I create data, in data I have to create a folder called mtm.

commented

So no way for CFM integration with 1.12.2 versions? I was able to get the APK from @MrCrayfish food mod repo, but I have no idea how to structure the recipes in the file...

commented

As I've previously said, you should update your mod to 1.14 and the problem is solved. If you want to stay in 1.12.2, then Idk how to help you.

commented

The only thing keeping me from updating to 1.14.4 is the fact that my mod depends on IC2, which is still on 1.12.2

If someone else can help me figure out the API (MrCrayfish?), that would be greatly appreciated. That and my brother keeps poking me to add compatibility with CFM without the need for editing configs :P

commented

Add the Furniture Mod as a dependency in your workspace. (You don't need to make your mod depend on it as it will naturally become an optionally dependecy if following steps correctly)
Create a simple class that has a public static method with IRecipeRegistry as a parameter.
Send an IMC message to the Furniture Mod in your mod class that points to this method.
FMLInterModComms.sendMessage("cfm", "register", "com.blah.MyClass.myStaticMethod");

Feel free to read this old tutorial: https://mrcrayfish.com/recipeapi.php

commented

So I've done that, but what do I set as input and output for the Washing Machine? I've tried setting both to my armor piece, but that still won't let me place it in, even if the armor is damaged. Should my armor have something in its class, or should I have some damage value tagged into the input. output variables?

commented

Is your recipe registering correctly? Turn on recipe-api-debug in the config

commented

You need to include CFM in your classpath. You can check if the mod "cfm" is loaded and load off of that.

commented

So I have to include CFM itself as a dependency in my dev env (I'm trying to make this one optional, and I already have code that detects if CFM is installed or not.)?

I've been including the API, with CFM in the 'mods' folder of the run directory, but it just crashes (crash log attached
crash-2020-01-20_18.29.57-client.txt
)