JaselUmena Posted November 8, 2015 Share Posted November 8, 2015 Hello! It's been a while since I last posted. Thanks to some of you (awesome people of the forum) our mod now has machines, batteries, armor, ores, tools and weapons with special effects, blocks that launch you into the air... but today I'm here for something a little bit different. I noticed a great mod by BluSunrize (Traveller's Gear) which allowed to add your very own accessories into the game with you know.. the infinite possibilities that adds. However, the mod has two ways of adding accessories. One is via a message to the mod from your mod when the mods are loading, in which we succeeded to the point that we managed to create an accessory to give jetpack-like flight to the player. After chatting with the mod maker himself (nice guy, he seems to be in the middle of a big project) he and a friend of him explained to me that the message between mods is limited and the API would allow for many other functions. Me and a friend (he is doing the code, I'm doing the textures) have decided to follow that advice and implement the API in the mod. The chat was as it follows: [23:57] <BluSunrize> do you use IDEA or eclipse? [23:58] <JaselUmena> Eclipse [23:58] <JaselUmena> well, my friend does, I'm the textures guy and also the one who speaks and types in English [23:58] <BluSunrize> download a decomp version of TG from curse [23:58] <cobra> simply reading code does help a lot [23:59] <BluSunrize> chuck it into "libs" [23:59] <BluSunrize> run "gradlew eclipse" [23:59] <BluSunrize> then you can use hte API and it'll compile with it. [23:59] <JaselUmena> Wait, so we can use all the code from the API just by doing that? [00:00] <BluSunrize> yes. [00:00] <cobra> and any serious IDE will tell you what parameters it wants and display the documentation for it. they will also allow you to look into the jar file and see what classes and methods are offered. [00:00] <BluSunrize> it'S either that [00:00] <BluSunrize> or packaging the API [00:00] <JaselUmena> (by the way, one of my friends managed to give the accessory the flight attribute) [00:01] <JaselUmena> still, I will try to use the API [00:01] <JaselUmena> will not forget to credit you in the unlikely event we publish our mod [00:02] <cobra> and if you're unsure about something, but know a mod doing something similar to what you want to achieve: look into that mod's source code, if it's available [00:02] == Rayere has changed nick to Rayere|Zzz [00:02] <JaselUmena> Okay, I will [00:02] <JaselUmena> hm... one last thing [00:03] <JaselUmena> what is the difference between the IMC and the API? More stability? [00:03] <BluSunrize> APi allows you to do way mroe things [00:04] <BluSunrize> equip and unequip handling [00:04] <BluSunrize> ticking [00:04] <JaselUmena> Okay, will go for the api then [00:04] <BluSunrize> IMC is really jsut intended for cosmetic items. [00:04] <JaselUmena> where did you say I could find the decomp api ^^"? [00:04] <JaselUmena> http://minecraft.curseforge.com/projects/travellers-gear [00:04] <JaselUmena> here? [00:05] <BluSunrize> the additional files on a version. [00:05] <cobra> and blu meant deobf(uscated) instead of decomp. [00:06] <JaselUmena> oh [00:06] <cobra> keep in mind deobf stuff won't work in non-dev environments (that is, any normal modded MC instance) [00:07] <JaselUmena> wait [00:07] <JaselUmena> so I wont be able to use my mod out of dev environment? [00:07] <cobra> no [00:07] <cobra> not like so [00:07] <JaselUmena> (also, can't find the files ;w;) [00:07] <BluSunrize> eeeh [00:07] <BluSunrize> this is hard to explain [00:07] <cobra> don't ever throw that deobf file into a normal mc mods folder [00:07] <cobra> only put it into the dev environment. [00:08] <JaselUmena> oh, I know [00:08] <BluSunrize> this isn'T really the thign to attempt for a first project .~. [00:08] <JaselUmena> Actually it started as a way to add a few blocks and materials for tinkers construct [00:08] <JaselUmena> but then it grew quite a bit [00:08] <cobra> everything will work as long as you use deobf for development and non-deobf for normal use. [00:09] <JaselUmena> okay, okay [00:09] <JaselUmena> so I download deobf for development purposes [00:09] <cobra> right. [00:09] <JaselUmena> and then for compiling I use the othe one? [00:09] <cobra> that is still development. [00:09] <JaselUmena> oh [00:10] <JaselUmena> okay, so you mean I should place it inside my project and compile everything afterwards [00:10] <JaselUmena> .w. [00:10] <cobra> exactly. [00:10] <JaselUmena> ah, that sounds easier [00:10] <JaselUmena> however... [00:10] <cobra> and if you want to test your new mod in a normal MC instance, use whatever came out of that build process together with the normal TG file. [00:10] <JaselUmena> where the heck are the deobf files on this site TTwTT? [00:11] <cobra> behind the +1 So what we did is to download the deobf and import it into the lib folder in our project. The question is: now what? Is that all that's needed for implementing and using an API? /Edit: Apparently importing that makes our mod unable to be compiled. Any ideas? Quote Link to comment Share on other sites More sharing options...
1Poseidon3 Posted November 9, 2015 Share Posted November 9, 2015 I don't know if this is what you are looking for but I went back and found a similar thread that I remembered seeing. It's for 1.8.* but I don't think that will make much of a difference. Take a look. http://www.minecraftforge.net/forum/index.php/topic,34791.0.html Quote egg Link to comment Share on other sites More sharing options...
JaselUmena Posted November 9, 2015 Author Share Posted November 9, 2015 Alright, so we finally figured out how to implement the API, though we still need some documentation on how to use it. We'll check GitHub for examples, so that won't be a real problem. Thank you all for your response! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.