The Meaning of Life, the Universe, and Everything.
Join Date:
9/1/2014
Posts:
63
Member Details
Hey thanks for this tutorial!
I am trying to make an addon for buildcraft, but I'm not sure what or where to get the distributeable binary for it?
If by distributeable binary you mean an deobfuscated buildcraft jar, I don't know how to deobfuscate it, or where to find one!
I have the source code in a zip I downloaded from github, I tried just putting that in my src\api but it didnt show all of the source just the API classes inside.
Hey thanks for this tutorial!
I am trying to make an addon for buildcraft, but I'm not sure what or where to get the distributeable binary for it?
If by distributeable binary you mean an deobfuscated buildcraft jar, I don't know how to deobfuscate it, or where to find one!
I have the source code in a zip I downloaded from github, I tried just putting that in my src\api but it didnt show all of the source just the API classes inside.
That's a question I would ask the authors of Buildcraft.
Typically, you extract the .jar file used for the API, put the .jar in your /libs or /api folder - this should allow you to import classes as needed - if you want to see the source, you need the actual .java files (which you can get from github) and attach those to the .jar file. Right-click on your referenced jar library, go to properties, then attach source.
The Meaning of Life, the Universe, and Everything.
Join Date:
9/1/2014
Posts:
63
Member Details
well I just actually downloaded a ZIP of the source code from github and changed the extension to a .jar and put it in my libs and then attached a folder with the unziped source code. It looks like it works so far.
Hello I wasn't sure where to put this but I saw this(sadly when I read it I was very disappointed) and I though it was how to MAKE an api so can someone direct me to one(if you think this should go somewhere else I will remove my post as long as you tell me where I should put it)?
Hello I wasn't sure where to put this but I saw this(sadly when I read it I was very disappointed) and I though it was how to MAKE an api so can someone direct me to one(if you think this should go somewhere else I will remove my post as long as you tell me where I should put it)?
There isn't really any way to create a guide for creating an API, other than the most very basic steps such as putting package-info files with the @API annotation (FML uses this for loading - I discuss this in the tutorial) and creating a deobfuscated jar for developers to use (basic Gradle stuff). Those are hardly worth writing a guide for...
Every API has different goals and thus different implementations and no simple 'this is the right way to design one.' You'd have to explain in quite a bit of detail what, exactly, you are trying to achieve by creating an API.
If you keep in mind that an API is simply about providing an interface for other people to interact with your mod, then you realize it doesn't really matter how you do it as long as it is simple and well-documented.
I'm trying to use CoFH Core(which is a coremod), and I've got it to the point where the Access Transformer is crashing the game. I have no resources directory in the forge workspace(I'm using the one that the script set up), and it makes no difference if I put CoFH_at.cfg in the src/main/resources directory. I could be being thick, but where does it go?
I should point out that I've only started on your tutorials with this one.
This tutorial has been about 100% more useful than any other tutorial I've read on the subject.
Rollback Post to RevisionRollBack
GENERATION 9004: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment
Yep, drop it in the src/main/resources directory, then re-run 'gradlew --refresh-dependencies setupDecompWorkspace'. The '--refresh-dependencies' part may not be required, but I usually add it.
Once you've run that, you should have a forgeSrc jar in your workspace/build/dirtyArtifacts/ directory, which you then use as your Forge source code instead of the standard one from MCP. This jar file has had its source code modified by the access transformer so you will be able to see those changes in your workspace.
Honestly, though, I have only ever worked with Battlegear2 as a core mod. Code Chicken Core may have different installation instructions - I would check their main page for details.
So, quick stupid question. I'm trying to use the RedstoneFlux-API, and I have the source code, but not the binary. Where would I get that? Would I need to contact someone, and who would that be?
So, quick stupid question. I'm trying to use the RedstoneFlux-API, and I have the source code, but not the binary. Where would I get that? Would I need to contact someone, and who would that be?
Thanks.
Can't you download the binary from the same place you got the source? If not, contact the author. Or compile it yourself, since you have the source code.
This is where I got it from. It's not a necessity right now, I'm more concerned with the GUI issues at the moment. But I certainly appreciate the help, and trouble. Anyway, I don't see a binary of it, and how would I go about compiling just those few things? Just turn them into class files and that's it? 'Cause I can do that. I just figured there was something more unique involved or whatever. And thank you, kindly.
This is where I got it from. It's not a necessity right now, I'm more concerned with the GUI issues at the moment. But I certainly appreciate the help, and trouble. Anyway, I don't see a binary of it, and how would I go about compiling just those few things? Just turn them into class files and that's it? 'Cause I can do that. I just figured there was something more unique involved or whatever. And thank you, kindly.
Why do you need to compile them anyway? You can't just throw the files into your /src/ folder and import them in your mod code?
Wait, so I can do that? Sorry, I thought I read that I had to have a binary distributable for this to work. If I can just include them then great. Thank you.
I have a learning disability so some things take longer for me to grasp or understand, so I do apologize. I grew up with it but I'm trying my best to fight it, believe me.
Why do you need to compile them anyway? You can't just throw the files into your /src/ folder and import them in your mod code?
If you do that, you'll need to make sure that you do not distribute the API files with your mod, unless that is how it is intended to be distributed (which I doubt, as then there would potentially be many copies of the same classes but all pointing to different locations, which wouldn't make any sense).
Better, imo, is to either drop the src files into your eclipse/libs directory and see if you can include them from there, or compile the src into class files, zip it, and drop it into your eclipse/mods folder. I have never tried using src files directly in such a fashion, and while it may work, it may not work when trying to test your mod in Eclipse because it will need compiled versions of the classes to run.
That's why I always suggest getting your hands on a deobfuscated binary, if you can, though a standard binary of the files should work just as well.
so one person says you dont need the binary i can just use the source. whats the difference between them and how can you help me to use a source of the code?
so one person says you dont need the binary i can just use the source. whats the difference between them and how can you help me to use a source of the code?
Yes, you can technically use the source code by including it directly in your project, but this is not recommended as you will then have to include the entire API with your mod when you distribute it. There may be a way to avoid that, but I haven't taken the time to mess around with it.
I am trying to make an addon for buildcraft, but I'm not sure what or where to get the distributeable binary for it?
If by distributeable binary you mean an deobfuscated buildcraft jar, I don't know how to deobfuscate it, or where to find one!
I have the source code in a zip I downloaded from github, I tried just putting that in my src\api but it didnt show all of the source just the API classes inside.
Can anyone help?
That's a question I would ask the authors of Buildcraft.
Typically, you extract the .jar file used for the API, put the .jar in your /libs or /api folder - this should allow you to import classes as needed - if you want to see the source, you need the actual .java files (which you can get from github) and attach those to the .jar file. Right-click on your referenced jar library, go to properties, then attach source.
^ I was wondering the same
There isn't really any way to create a guide for creating an API, other than the most very basic steps such as putting package-info files with the @API annotation (FML uses this for loading - I discuss this in the tutorial) and creating a deobfuscated jar for developers to use (basic Gradle stuff). Those are hardly worth writing a guide for...
Every API has different goals and thus different implementations and no simple 'this is the right way to design one.' You'd have to explain in quite a bit of detail what, exactly, you are trying to achieve by creating an API.
If you keep in mind that an API is simply about providing an interface for other people to interact with your mod, then you realize it doesn't really matter how you do it as long as it is simple and well-documented.
Ok thanks I didn't really know what it was but that makes sense to me now thanks for answering
Hi,
I'm trying to use CoFH Core(which is a coremod), and I've got it to the point where the Access Transformer is crashing the game. I have no resources directory in the forge workspace(I'm using the one that the script set up), and it makes no difference if I put CoFH_at.cfg in the src/main/resources directory. I could be being thick, but where does it go?
I should point out that I've only started on your tutorials with this one.
This tutorial has been about 100% more useful than any other tutorial I've read on the subject.
Yep, drop it in the src/main/resources directory, then re-run 'gradlew --refresh-dependencies setupDecompWorkspace'. The '--refresh-dependencies' part may not be required, but I usually add it.
Once you've run that, you should have a forgeSrc jar in your workspace/build/dirtyArtifacts/ directory, which you then use as your Forge source code instead of the standard one from MCP. This jar file has had its source code modified by the access transformer so you will be able to see those changes in your workspace.
Honestly, though, I have only ever worked with Battlegear2 as a core mod. Code Chicken Core may have different installation instructions - I would check their main page for details.
Thanks for getting back.
I've just run that command (sans --refresh-dependencies), and I'm seeing that the script has found the AT file. This is looking good.
I did check the CoFH pages before I asked, and nowhere did I see anything about installing CoFH core into a dev workspace.
OK, that has MC working now. Thanks for your help.
So, quick stupid question. I'm trying to use the RedstoneFlux-API, and I have the source code, but not the binary. Where would I get that? Would I need to contact someone, and who would that be?
Thanks.
insert witty signature here
Can't you download the binary from the same place you got the source? If not, contact the author. Or compile it yourself, since you have the source code.
https://github.com/CoFH/RedstoneFlux-API
This is where I got it from. It's not a necessity right now, I'm more concerned with the GUI issues at the moment. But I certainly appreciate the help, and trouble. Anyway, I don't see a binary of it, and how would I go about compiling just those few things? Just turn them into class files and that's it? 'Cause I can do that. I just figured there was something more unique involved or whatever. And thank you, kindly.
insert witty signature here
Why do you need to compile them anyway? You can't just throw the files into your /src/ folder and import them in your mod code?
Wait, so I can do that? Sorry, I thought I read that I had to have a binary distributable for this to work. If I can just include them then great. Thank you.
I have a learning disability so some things take longer for me to grasp or understand, so I do apologize. I grew up with it but I'm trying my best to fight it, believe me.
insert witty signature here
If you do that, you'll need to make sure that you do not distribute the API files with your mod, unless that is how it is intended to be distributed (which I doubt, as then there would potentially be many copies of the same classes but all pointing to different locations, which wouldn't make any sense).
Better, imo, is to either drop the src files into your eclipse/libs directory and see if you can include them from there, or compile the src into class files, zip it, and drop it into your eclipse/mods folder. I have never tried using src files directly in such a fashion, and while it may work, it may not work when trying to test your mod in Eclipse because it will need compiled versions of the classes to run.
That's why I always suggest getting your hands on a deobfuscated binary, if you can, though a standard binary of the files should work just as well.
Ah okay. Thanks, I will try that.
insert witty signature here
so one person says you dont need the binary i can just use the source. whats the difference between them and how can you help me to use a source of the code?
Yes, you can technically use the source code by including it directly in your project, but this is not recommended as you will then have to include the entire API with your mod when you distribute it. There may be a way to avoid that, but I haven't taken the time to mess around with it.