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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • 삼성호스트바 ☜kbox1·com♨ 수표호스트바 창녕호스트바 마포호스트바 서교호스트바 jjb20 제천호스트바 회기호스트바 중림호스트바 진주호스트바 vgc60 가평호스트바 교남호스트바 일원호스트바 북아현호스트바 dgf03 독산호스트바 마곡호스트바 내발산호스트바 군포호스트바 hrw67 서교호스트바 장충호스트바 무악호스트바 행당호스트바 yfq58 수하호스트바 남산호스트바 신촌호스트바 팔판호스트바 jpf41 안양호스트바 울산호스트바 신설호스트바 상수호스트바 ofk82 토정호스트바 일원호스트바 내발산호스트바 부천호스트바 hml59 안양호스트바 관훈호스트바 연남호스트바 서교호스트바 lha26 봉천호스트바 진관호스트바 창녕호스트바 상수호스트바 bbl69 천호호스트바 낙원호스트바 의정부호스트바 한강호스트바 wse93 예장호스트바 시흥호스트바 하계호스트바 저동호스트바 cwo89 창녕호스트바 장위호스트바 소격호스트바 신영호스트바 gpn15 오쇠호스트바 여수호스트바 동작호스트바 청운호스트바 nmi40 목동호스트바 배방호스트바 용인호스트바 군산호스트바 dkk90 팔판호스트바 자곡호스트바 청주호스트바 산림호스트바 drt37 율현호스트바 잠실호스트바 회현호스트바 원주호스트바 wen22 충정호스트바 초동호스트바 휘경호스트바 명일호스트바 hhg53 노원호스트바 칠곡호스트바 수유호스트바 마장호스트바 vqj99 당인호스트바 대치호스트바 갈현호스트바 홍지호스트바 jwd98 청진호스트바 이방호스트바 북가좌호스트바 화순호스트바 ard15 해남호스트바 고양호스트바 구미호스트바 고척호스트바 pil39 남창호스트바 대현호스트바 영천호스트바 창천호스트바 wwj41
    • Delete the config file of nochatreports If there is no change, remove this mod
    • Remove animatedrecipebook from your server It is a client-side-only mod   If this is not working, add the new crash-report Add crash-reports with sites like https://paste.ee/ and paste the link to it here
    • i also finally managed to get it working heres my finished colorHandler that works currently for 1.18.2 and from what i can tell should work post version 1.12   //code start package com.zer0_the_wolf.layeredarmor.item.custom; import com.zer0_the_wolf.layeredarmor.item.LayeredArmoritems; import net.minecraft.client.color.item.ItemColor; import net.minecraft.client.color.item.ItemColors; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.DyeColor; import net.minecraft.world.item.DyeableArmorItem; import net.minecraft.world.item.DyeableLeatherItem; import net.minecraft.world.item.ItemStack; import net.minecraftforge.client.event.ColorHandlerEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; public class ColorHandlers { @SubscribeEvent public static void registerItemColors(ColorHandlerEvent.Item event) { event.getItemColors().register(ColorHandlers::getColor, LayeredArmoritems.LEATHERCHAINHELMET.get(), LayeredArmoritems.LEATHERCHAINCHESTPLATE.get(), LayeredArmoritems.LEATHERCHAINLEGGINGS.get(), LayeredArmoritems.LEATHERCHAINBOOTS.get()); } private static int getColor(ItemStack pStack, int tintIndex) { CompoundTag compoundtag = pStack.getTagElement("display"); if (tintIndex == 0) { return compoundtag != null && compoundtag.contains("color", 99) ? compoundtag.getInt("color") : 10511680; } return 0xFFFFFF; } } //end code do note that you have to add a listener should be same place you added a listener for the event bus. mine looks like. eventBus.addListener(ColorHandlers::registerItemColors);
    • Appreciate the help, but I did manage to figure it out with some tutorials. The main problem was figuring out how to calculate the angles for the arrows to shoot at
  • Topics

×
×
  • Create New...

Important Information

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