Jump to content

Recommended Posts

Posted (edited)

I'm currently working on an API for my mod which uses some events and Capabilities. An abstract class I made references my Main class. Should I include the Whole class in the api or should I cut everything but the references? Or in general what should I include into my Api.jar (and how can I create it)?

Edited by _Cruelar_

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted

Depends on what you're wanting to put into the API, but remember this is not a Java school. We're not here to tell you how to make API's, but I'd recommend you make people interact with interfaces. 

API's definition is basically this;

  Reveal hidden contents
 

If you want to make an API so other mods can add recipes to your mod's machines, you can. But that's really up to you. 

Please give a little more info about what the API should do, then I can give you some coding advice.

Posted

I have some capabilities that should be able to be used and one of the most important things an abstract class for handles most of the registry for the Results of my recipes. My biggest Problem is that it refers to my ItemStorage (ModItems) and my CreativeTabs which refer to a lot of other stuff which would result in including around 1/4 of my mod.

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted (edited)
  On 12/9/2018 at 1:25 PM, _Cruelar_ said:

I have some capabilities that should be able to be used

Expand  

Your mod has the capability, you don't have to put it in an API, other programmers can make their mod as a dependency of yours. But if you want to you can just move them into an API, but make sure to include it in your gradle buildfile so it compiles.

  On 12/9/2018 at 1:25 PM, _Cruelar_ said:

abstract class for handles most of the registry for the Results of my recipes

Expand  

what kind of recipes exactly

Edited by tebreca
Posted

Cooking pot Recipes out of my mod:

  Reveal hidden contents

 

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted (edited)

You can just as I said, make your mod the library. There's not much wrong with that, just make sure you have all fields that aren't to be accessed marked private.

  Quote

Your mod has the capability, you don't have to put it in an API, other programmers can make their mod as a dependency of yours.

Expand  
 

 

Edited by tebreca
Posted

Ok, I just thought it could be easier for others to have only a small part of my code (looking at Data amount my mod is at around 0.8 MB)

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Posted
  On 12/9/2018 at 2:10 PM, _Cruelar_ said:

Ok, I just thought it could be easier for others to have only a small part of my code (looking at Data amount my mod is at around 0.8 MB)

Expand  

it is, but on the other hand it isn't, having to mess with api's is sometimes harder than just making a dependency of a mod

Posted

Thanks for explaining me, for the next mod I should think more about getting api stuff independent. I recently struggled with the small possibilities of the journeymap api, so yeah the whole mod should be better then I think.

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

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.