Jump to content

[1.12.1] Implementation of an API (Baubles)


Recommended Posts

Posted (edited)

I kinda hate to ask you peoples yet another thing after you helped me so recently, but that's what you're here for, right?

 

I'd like to use Baubles so my existing items can be equipped in the slots created by baubles. Unfortunately, the only guide I can find for using APIs is this, and it was published in early 2014, and last edited in early 2015. So yeah, I'm not sure how reliable that is, and whether or not it'll break my existing code if I try to follow it.

 

So this post basically just comes down to "hey, hey someone more experienced than me please help me figure out how to use the Baubles API"

Again, all my code can be found here.

 

Thanks in advance!

(This post assumes the 1.12 baubles version will work in 1.12.1)

Edited by Fijal
Posted

How will you use the API? Will it have to be downloaded separately or do you want it integrated into your mod?

If it is integrated into the mod, you can download the de-obf.jar and use winrar to copy the packages and assets in.

If it is downloaded separately, in IntelliJ you can add dependencies in Project > Modules > Dependencies. You add the .jar there

Posted (edited)

Few notes, I don't own Winrar so I'm using 7Zip and I'm using Eclipse instead of IntelliJ which I could never setup properly.

 

I'd be making it integrated into the mod I because I assume that makes for easier downloading.

So, I downloaded the file called Baubles-1.12-1.5.1-deobf, extract the files using 7Zip, and based on something I read, I put the extracted files in /src/api/.

All the files I extracted are .Class, not .Java, so Eclipse can't read them. Is that supposed to happen, or if I'm integrating it should I have downloaded the source version of Baubles?

 

Edit: If I were going to make it so Baubles must be downloaded separately (and it works if I do this so maybe I will), how do I make an item equipable in a Baubles-added slot? Is there an example item somewhere?

 

 

Edited by Fijal
Posted

There is your problem.
Thats not how that should be done. Baubles in an independend mod and its api is just something you can access.
 

Since there does not seem to be a maven repository for baubles just put the jar in a new libs/ folder in your project root.

And run: gradle --refresh-dependencies

It should become available as a library in your working environment.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Posted

You can use any Git repository (like Baubles) as a Maven dependency through JitPack. I do this in my mod here.

 

You can also use CurseForge as a Maven repository through its API (see the Maven section).

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

I put Baubles-1.12-1.5.1-debof.jar in */libs/, ran ./gradlew setupDecompWorkspace --refresh-dependencies,(because I'm using powershell, the new default win10 1703, and I did setupDecomp thing because you have to run something before the --refresh thing.) opened up Eclipse, typed "IBauble" to get quick access to a Baubles file, and it said something like class file error and asked for a source.

 

Then thinking maybe I should try the API version of Baubles I downloaded Baubles-1.12-1.5.1-debof.jar, and did the same thing. This time it worked. Is it supposed to be like that?

Posted (edited)
  On 9/16/2017 at 3:04 AM, Choonster said:

You can use any Git repository (like Baubles) as a Maven dependency through JitPack. I do this in my mod here.

 

You can also use CurseForge as a Maven repository through its API (see the Maven section).

Expand  

So, I just put

deobfCompile "com.github.azanor:Baubles:${baubles_version}"

in the dependencies section of my build.gradle

and

maven { url 'https://jitpack.io' }

to the repositories sections build.gradle and I won't need a baubles.jar?

 

Or would you suggest the CurseForge API?

 

 

Edited by Fijal
Posted
  On 9/16/2017 at 3:11 AM, Fijal said:

So, I just put

deobfCompile "com.github.azanor:Baubles:${baubles_version}"

in the dependencies section of my build.gradle

and

maven { url 'https://jitpack.io' }

to the repositories sections build.gradle and I won't need a baubles.jar?

Expand  

 

Yes, once you've done that you don't need to manually download the Baubles JAR.

 

Make sure you actually define the baubles_version variable somewhere (e.g. in gradle.properties). This is the tag or commit ID that you want to depend on.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted (edited)

So, gathering this all into one post, I put deobfCompile "com.github.azanor:Baubles:${baubles_version}" and maven { url 'https://jitpack.io' } in their respective sections of my build.gradle, make a gradle.properties file, and place baubles_version=7035b13 (which is still the latest commit) in it.

 

Do I need to place my versions of the following in gradle.properties as well?

mod_name=TestMod3
package_group=choonster.testmod3

mc_version=1.12.1
forge_version=14.22.0.2462

 

Also, will I be able to view BaublesApi.class as if I had the .jar?

Edited by Fijal
Posted
  On 9/16/2017 at 3:23 AM, Fijal said:

So, gathering this all into one post, I put deobfCompile "com.github.azanor:Baubles:${baubles_version}" and maven { url 'https://jitpack.io' } in their respective sections of my build.gradle, make a gradle.properties file, and place baubles_version=7035b13 (which is still the latest commit) in it.

Expand  

 

Yes.

 

  On 9/16/2017 at 3:23 AM, Fijal said:

Do I need to place my versions of the following in gradle.properties as well?

Expand  

 

You don't have to, I only have them there because my buildscript uses those variables. I do recommend doing something similar in your own buildscript.

 

  On 9/16/2017 at 3:23 AM, Fijal said:

Also, will I be able to view BaublesApi.class as if I had the .jar?

Expand  

 

Yes, the source code from the repository will be linked to the JAR in your IDE.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

So I deleted all .jar files from */libs/ so it's completely empty now, and did all the stuff we talked about up above, ran ./gradlew setupDecompWorkspace --refresh-dependencies, launched eclipse and I can no longer find any classes named BaublesAPI.class or anything similar. Should I have kept a .jar file in */libs/?

Posted
  On 9/16/2017 at 3:57 AM, Fijal said:

So I deleted all .jar files from */libs/ so it's completely empty now, and did all the stuff we talked about up above, ran ./gradlew setupDecompWorkspace --refresh-dependencies, launched eclipse and I can no longer find any classes named BaublesAPI.class or anything similar. Should I have kept a .jar file in */libs/?

Expand  


You probably need to refresh your IDE project. I think the way to do this for Eclipse is by re-running the eclipse Gradle task. If you were using IDEA, you'd just click the Refresh all Gradle Projects button in its Gradle window.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted (edited)

oooh it works now. Thanks! I thought I wouldn't need to re-run that bit.

 

Does Baubles still have that example ring? Or was that removed? I ask  because I'm not seeing it, and I imagine that would be helpful for making my own custom items.

 

Edit: nvm, I found it just as I asked...

Edited by Fijal
  • 2 years later...
Posted

I'm using eclipse IDE I've followed this thread and tried everything and can't figure out how to get this to work properly. The version you have is out of date now it is 1.5.2, but every time i try to refresh dependencies it says

  startup failed:
  build file 'C:\MinecraftModing\ElementalBaubles\build.gradle': 43: unexpected token: com.github.azanor:Baubles:1.5.2 @ line 43, column 12.
        Compile "com.github.azanor:Baubles:1.5.2"

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I’ve been reluctant in purchasing this blank atm card I heard about online because everything seems too good to be true, but I was convinced & shocked when my friend at my place of work got the card from "recoveryintelligent wozniak" & we both confirmed it really works, without delay I gave it a go. Ever since then I’ve been withdrawing $4950 daily from the card & the money has been in my own account. So glad I gave it a try at last and this card has really changed my life financially without getting caught, it really & truly works and it’s legal also made me rich!! If you need this card from "recoveryintelligent wozniak" then, Email: wozniakrecoveryintelligent AT zohomail . com    You can also contact them for the service below   Western Union Transfer Bank Transfer PayPal / Skrill Transfer Crypto Mining CashApp Transfer Bitcoin Loans Recover Stolen/Missing Crypto/Funds/Assets Email: wozniakrecoveryintelligent AT zohomail . com I’ve been reluctant in purchasing this blank atm card I heard about online because everything seems too good to be true, but I was convinced & shocked when my friend at my place of work got the card from "recoveryintelligent wozniak" & we both confirmed it really works, without delay I gave it a go. Ever since then I’ve been withdrawing $4950 daily from the card & the money has been in my own account. So glad I gave it a try at last and this card has really changed my life financially without getting caught, it really & truly works and it’s legal also made me rich!! If you need this card from "recoveryintelligent wozniak" then, Email: wozniakrecoveryintelligent AT zohomail . com    You can also contact them for the service below   Western Union Transfer Bank Transfer PayPal / Skrill Transfer Crypto Mining CashApp Transfer Bitcoin Loans Recover Stolen/Missing Crypto/Funds/Assets Email: wozniakrecoveryintelligent AT zohomail . com I’ve been reluctant in purchasing this blank atm card I heard about online because everything seems too good to be true, but I was convinced & shocked when my friend at my place of work got the card from "recoveryintelligent wozniak" & we both confirmed it really works, without delay I gave it a go. Ever since then I’ve been withdrawing $4950 daily from the card & the money has been in my own account. So glad I gave it a try at last and this card has really changed my life financially without getting caught, it really & truly works and it’s legal also made me rich!! If you need this card from "recoveryintelligent wozniak" then, Email: wozniakrecoveryintelligent AT zohomail . com    You can also contact them for the service below   Western Union Transfer Bank Transfer PayPal / Skrill Transfer Crypto Mining CashApp Transfer Bitcoin Loans Recover Stolen/Missing Crypto/Funds/Assets Email: wozniakrecoveryintelligent AT zohomail . com   I’ve been reluctant in purchasing this blank atm card I heard about online because everything seems too good to be true, but I was convinced & shocked when my friend at my place of work got the card from "recoveryintelligent wozniak" & we both confirmed it really works, without delay I gave it a go. Ever since then I’ve been withdrawing $4950 daily from the card & the money has been in my own account. So glad I gave it a try at last and this card has really changed my life financially without getting caught, it really & truly works and it’s legal also made me rich!! If you need this card from "recoveryintelligent wozniak" then, Email: wozniakrecoveryintelligent AT zohomail . com    You can also contact them for the service below   Western Union Transfer Bank Transfer PayPal / Skrill Transfer Crypto Mining CashApp Transfer Bitcoin Loans Recover Stolen/Missing Crypto/Funds/Assets Email: wozniakrecoveryintelligent AT zohomail . com
    • There is an issue with Modular Force Field System (mffs) Remove it or try other builds
    • I never imagined I would be writing this kind of testimony, but I feel it’s important to share my experience with Malice Cyber Recovery and how they helped me recover $230,000 I lost to crypto scammers. A few months ago, I got involved in a crypto investment opportunity that seemed legitimate at first. The scammers were incredibly convincing. They showed me impressive returns, sent regular updates, and even gave me access to what looked like a real trading platform. I was initially cautious, but after seeing the returns, I began to invest more, ultimately transferring over $230,000. Unfortunately, after a few weeks, when I tried to withdraw my funds, I found that the platform had disappeared, and I could no longer contact anyone involved. It was clear I had been scammed, and I felt completely helpless. For weeks, I tried everything to get my money back—contacting the authorities, reaching out to the platform’s so-called support team (who of course were unreachable), and trying to trace the transactions myself. But everything led to dead ends. The more I researched, the more I realized just how hard it was to recover stolen crypto. I began to lose hope. That’s when I came across Malice Cyber Recovery. At first, I was skeptical. Could they really help me recover my funds after everything I had been through? I decided to reach out anyway, just to see if they could offer any guidance. From the very first conversation, their team was not only professional but also deeply empathetic. They understood exactly how I was feeling and immediately made it clear that they were dedicated to helping me recover my lost funds. Malice Cyber Recovery’s team got to work quickly. They walked me through every step of the process, explaining the methods they would use to track down my stolen crypto. Their knowledge of blockchain technology and how to trace crypto transactions was incredibly impressive. They didn’t just give me vague promises they showed me the action they were taking and the progress they were making, which gave me hope that my money wasn’t gone forever. One of the most reassuring aspects of working with Malice Cyber Recovery was their transparency. They kept me updated regularly, letting me know what they were doing, what obstacles they encountered, and how they were overcoming them. It wasn’t an easy process; tracing funds through blockchain and dealing with scammers who hide behind fake identities and complex networks is incredibly difficult. But Malice Cyber Recovery’s team was relentless. They used advanced tools and techniques to trace the flow of my funds, and within just a few weeks, they managed to locate a significant portion of my lost funds. I couldn’t believe it when they informed me that they had successfully recovered a large chunk of my money. I never thought I’d see that $230,000 again. The recovery process wasn’t instantaneous it  took time, patience, and persistence but Malice Cyber Recovery delivered on their promise.  
    • Almost, just the java -server -Xmx4G -Xms4G -Dlog4j.configurationFile=log4jformattingfix.xml -jar forge-1.12.2-14.23.5.2860.jar nogui and if that doesn't work, try java --version
    • What so just copy and paste " java -server -Xmx4G -Xms4G -Dlog4j.configurationFile=log4jformattingfix.xml -jar forge-1.12.2-14.23.5.2860.jar nogui Pause >nul " into a cmd terminal? If that's what you mean, nothing happens
  • Topics

×
×
  • Create New...

Important Information

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