Jump to content

1.18.2 - intellij 2022 -Setup Dependencies from own Mod


DePhoegon

Recommended Posts

I am having some of the most insane bit of trouble setting up dependencies from other mods.

I want to be able to use my mod as a base & include it as a resource for other mods I am making.    I am flat out having an insane trouble setting it up, much less getting any other mod setup as a dependency.

(I am able to get Ones like JEI & Patchouli to work, but they have already set it up so it's REALLY easy with gradle importing)

 

The documentation is a minimium of 4 years out of date & is flat out not valid for current versions of forge gradle projects.   The section I would LOVE to actually work because it flat out says how to do exactly what I want done Testing with Existing Mods - Outdated & still included in 1.18.x& 1.19.x - 

I do feel behind on the 8ball as it where, but the official gradle sources are very general & do not cover what's properly needed (because MC & forge are a bit different), and the forge documents .... require outdated software to run properly & that's assuming newer gradle would run on those versions anyways.

Link to comment
Share on other sites

To use your mod as a dependency in a different project, your mod needs to be published to a maven repository. This can just be a local maven repository on your computer.

There is a template at the bottom of the example mdk mod, but the relevant docs are the gradle ones.

https://docs.gradle.org/current/userguide/publishing_maven.html

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

I just, want to be clear on the steps.

On the project I want to be a dependency for my other project I Use the gradle command [ publish / publishtomavenlocal ]
--  I'm having alittle bit of issue finding where it put the files & move/store them on my system for local use.

I was able to find build/publish/pom-default.xml  & build/libs/zyx.jar file sharing the same timestamps.

Just to be clear I link the xml as a new maven in repositories & put the jar file in the ./libs folder?

Sorry to be exceptionally confused & confusing about this.  It's a hurdle.

-----------------------

*Edit

I can not seem to get it to be added & load correctly.

It will build correctly with my mod, but can not seem to load correctly & I'm flat out not sure what's wrong.

All my calls for vanilla blocks are obfuscated & I've array lists that crashing because are coming off as null with the client runs.

 

I honestly need A bit more of a spotlight, I am absolutely failing to see what's going wrong.   
-- I am trying to download sources (as intellij suggests, but I am not sure that's going to help). 

I swear I'm losing my mind >.>

Edited by DePhoegon
failure
Link to comment
Share on other sites

Look at the examples in the mdk, in particular the comment above the dependencies that have fg.deobf that remaps the mod back into your choice of deobfuscation mapping

You also need to specify the dependency in the mods.toml of the using mod, otherwise forge won't know the order to load the mods.

https://forge.gemwire.uk/wiki/Mods.toml

 

It is very hard to help you. I can tell you don't understand what is going is on, but the "random" and incomplete information you post means I have to try to guess what the problem is.

If you have a problem, show what is not working, not your (probably wrong) description of what you think is happening.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

10 hours ago, warjort said:

Look at the examples in the mdk, in particular the comment above the dependencies that have fg.deobf that remaps the mod back into your choice of deobfuscation mapping

You also need to specify the dependency in the mods.toml of the using mod, otherwise forge won't know the order to load the mods.

https://forge.gemwire.uk/wiki/Mods.toml

 

It is very hard to help you. I can tell you don't understand what is going is on, but the "random" and incomplete information you post means I have to try to guess what the problem is.

If you have a problem, show what is not working, not your (probably wrong) description of what you think is happening.

It's fairly 'incomplete' because alot of it does feel exactly like guess work.   
I don't know to get it to spit into the correct format, where to place the files or 'which files'.
I don't even know how to get it said files to load correctly, with what appears to be critically mising information about some things seemed to be written up to common sense when it's not mentioned anywhere.

I'm going to 'retry' it, because I honestly had forgotten about the mods.toml  (but I suspect some missing details about setting up for deobf )

I can tell you what happened, it got added in as a library & I could see the code, but it failed to test the client correctly because a bunch of arrays came back null Like they were not created correctly still had obfuscated names & methods & could not be resolved.

 

OneDrive TS_screenshots folder 

 

Pretty damn sure I some how didn't set it up correctly or some how grabbed the wrong files.  Every time I attemptted to use fg.deobf, it failed, outright.

==============================

Intended target to be made into a dependency

I've not git posted the mod that was intended to use it.  Though a version of it is on my github.  ATM I am just working out and doing what it takes to get it to a functional enough state for a 1.18.2.

Edited by DePhoegon
Additional Links
Link to comment
Share on other sites

Just ...  Lock this if you kindly would.

I got pointed at using 'curseforge' from dependencies (which really should be an upfront resource) & it's just flat out easier.
-Yes i was going to use curseforge to spread my mod anyways which was the intent, so this just makes it 100x easier.

Good *****   I'm beyond frustrated.. but w/e  I'll get over it & just be willing to use cursemaven.    Thanks for your time. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.