Topic category: User side tutorials
1. Download CuriosAPI plugin
2. Go to workspace settings, external apis, and tick the box next to CuriosAPI
3. Create a new custom code element
4. Copy this into the element, replacing what was already there;
package net.mcreator.YOURMODID; import top.theillusivec4.curios.api.SlotTypePreset; import top.theillusivec4.curios.api.SlotTypeMessage; import top.theillusivec4.curios.api.CuriosApi; import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.InterModComms; import net.minecraftforge.eventbus.api.SubscribeEvent; @Mod.EventBusSubscriber(modid="your_mod_id", bus=Mod.EventBusSubscriber.Bus.MOD) public class ModElementName { @SubscribeEvent public static void enqueue(final InterModEnqueueEvent evt) { InterModComms.sendTo(CuriosApi.MODID, SlotTypeMessage.REGISTER_TYPE, () -> SlotTypePreset.NECKLACE.getMessageBuilder().build()); } }
5. Replace Necklace with whatever you want the slot to be
Now to add the item to the slot
1. Open workspace folder
2. Create a folder in src/main/resources/data called "curios"
3. In this folder, create another called "tags"
4. In that one, make one called "items"
5. Then, create a json filed named SLOT.json (e.g. necklace.json) and save it in the folder
6. Paste the following inside, replacing to match your mod;
{
"replace": false,
"values": [
"your_mod_id:item_name"
]
}
Done! If this helps you let me know, and thanks to MissLexyShaodws and FrostyGames0 for helping me figure it out.
I have learned how to add an item and a slot for the Curious API,
but I do not know how to add models or properties for this item.
Can you tell me how to do this?
hey, i got an error saying "reached end of file while parsing." any help?
Is there a plugin that supports this for 2023.3? :)
I get an Error because it's void
Are there predetermined SlotTypePresets or can I make my own in Mcreator? If it’s complicated how would I make my own preset?
As of the latest update you can just use the plugin - it has the ability to make your own slots too