Started by
ImCloud13
on
Topic category: Help with Minecraft modding (Java Edition)
I want to check a players inventory for an item from another mod, then do something if they have it. I'm making an add-on for another mod that is only in 1.12.2, so I'm using MCreator 2020.2.
I'm not sure if this is possible with 2020.2. MCreator has some tools for working with cross-mod compatibility, but they were added in newer versions for 1.19+. You should probably still be able to do this, but it would likely require custom code, and I'm not all that familiar with the 1.12 generator.
I'd recommend making a procedure that checks for an item in the player's inventory the normal way, locking it, and attempting to add in the Mod ID and item name of the other item- though this will likely break if the other mod is not installed, and you don't also include a check for that mod. Again, not entirely sure how you'd go about this without MCreator's built in functions, but it should technically be possible. (Might also be worth looking into some open-source 1.12 mods on Github to get an idea of what the code for this would look like?
I see, thank you.