Topic category: Help with Minecraft modding (Java Edition)
This is a custom code question, so it may be more complicated.
I have basic knowledge of Java, but I do not know much about how Minecraft, Forge, or any other system handles its packages and why or why not a file won't compile.
I'm trying to make an addon to my own mod, but to do that, I need to have one mod access resources from the other. From what I can tell, my code is correct, but when I try to compile the mod, MCreator rejects the custom code as an error, not being able to recognize the foreign package. I have the other mod listed as a dependency, so all is well, however, I only get the auto-generated version of my procedure when I try to run it in-game instead of my custom code version. All I am trying to do is access a mob effect from one mod and use it in the other. I found workarounds for everything else (I know of one for this but the performance is lousy). Does anyone have advice? Is my code wrong?
Console log and a code snippet are included
https://drive.google.com/file/d/11KSxZJyVXzMQnXBvOmFlhSWxfavzbnXu/view?usp=sharing
https://drive.google.com/file/d/1bBMT5G1kCSDo4_Ga6M6OcH3Rpkbjsv5E/view?usp=sharing
Embeds didn't work on my end, so here are the screenshots of the log and code
The file you are referencing does not seem to exist. You can't force something to work, you need to write correct code
The file exists in another mod. Apologies for my ignorance, but how to a point it to something within a different mod?
Unless you have a plugin that adds the mod as a checkbox dependency, dependency mods (e.g. ones you list it in the "additional dependencies" text box), are not automatically downloaded, and you have to provide the mod(s) separately. You can do this by putting the mod's JAR in the run/mods folder, though this sometimes doesn't work.
Hope this helps! :)
Yeah, it didn't work for me for whatever reason, though I have tried many times. Thank you for the help in any case