Started by
DerexXD
on
Topic category: Help with Minecraft modding (Java Edition)
I need someone to help me make a simple artifact using the curios API. Someone here made a plugin for it but I'm not sure where to go after installing it.
For reference, curios is the widely used API that allows you to put rings and stuff on you in inventory slots. You find it in many modpacks.
Hello
Thank you Bounccake, i managed to do it thanks to you.
I had some troubles making it work so i'll add details:
First of all, i use MCreator 2021.2 with 1.16.5 generator.
1] Curios as a dependency:
a. Go to https://mcreator.net/plugin/65444/more-apis-support and download the api
b. In MCreator go to File > Preferences > Manage plugins
c. Click on Load plugin... and select the zip you just downloaded
d. "More Apis plugin" should now appears on the list and says in green text "loaded: yes"
e. Click on "Save" and restart MCreator
Now, i saw in another post that you can add Curios as a dependency with these steps:
cf: https://mcreator.net/forum/69321/info-curios
But it didn't work for me as the Curios checkbox never showed up.
Here is how I did it:
f. Click on the "Workspace" menu, then Open workspace folder
g. edit build.gradle file
You should add these lines after the minecraft { [whatever] } block :
and add these two lines in the dependencies group (replace ${curios_version} with the version of curios you use in your modpack, e.g. 1.16.5-4.0.5.2)
Finally your build.gradle file should look like this:
Save the file and restart MCreator now.
2] Add the compatibility code into your mod
a. In your workspace, add a new element by clicking the green "+" button
b. select the "custom element", I called it "CuriosRingEmplacement"
c. add these lines at the top of the file, after the the "package net.mcreator.yourmodname" line :
d. then add these between the main element class (public ElementName() {}) and the first @SubscribeEvent line
You can replace RING by any of these:
CURIO / BACK / BELT / BODY / CHARM / HEAD / HANDS / NECKLACE
in the end, your file should look like this:
I repeated this for each emplacement I used in my mod, but maybe you can do it in a single file with something like this:
But I didn't try it.
3. add your item as a curios
Go back to your workspace folder, then go to (create folders that don't exist):
[yourmodname]/src/main/resources/data/curios/tags/items
Create the file ring.json (or charm.json, necklace.json ...)
and add these:
and Voilà !
Everything should work fine now
Well I still have some trouble I'll list here:
1) curios mod doesn't work correctly in the test runtime environement, i'm unable to place my items in the curios emplacement because they just don't show up. But if I export the mod and use it in a real environment, everything works fine.
2) in MCreator procedures, I can find a "Curios API" category where i can find two functions: "is Curio item [item] equipped" and "Get item in curio slot type [type] and slot number [number] for [entity]"
These don't work at all, I have an error that says "block [is_curio_itemstack_equipped] is not supported by the selected generator". I think this isn't available for 1.16.5, so I have to make my items work in the inventory and not while equipped. I Hope this will be fixed in future Library version.
I believe we are missing something, I created a blank mod pack with just the two mods and the UI still does not show so we are registering the item fine but we are not triggering the UI to show so this isn't a MCreators runtime problem, we seem to be missing a trigger for the Curios API to right the config for it or how ever it's meant to be triggered.
Same for me, MissLexyShadows. Also when I try to go to src/main/resources/data/curios/tags/items in the workspace folder, I can't find the curios folder. When I try altering the build.gradle file, mcreator goes haywire. But I can still see the curios icon in my survival inventory when I run the client.
Okay now, it's giving me this error when I try to run the client or build:
public class CuriosAccessoryCode {
^
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
1 actionable task: 1 executed
Hi Astah! My curios won't appear in my inventory, but it seems like other mods are working. I don't even see the slot. Have you run into a similar issue when running it in a separate environment (outside of MCreator)
Now you can use a great plugin for this: https://mcreator.net/plugin/90992/nerdys-curios-api-plugin