Jump to content

How to add external jar's to the classpath in the most clean and ethical way


azathoth22

Recommended Posts

I would like your oppinion on this.

 

I need to add two jar files to the mod classpath.

 

Basically they come from the Reflections library http://code.google.com/p/reflections/

 

The need comes from me wanting to register blocks, items, entities,fluids, etc automatically using annotations in the following manner :

 

To define my blocks like this

@ObjectInfo(name="Sculpted Stone", unlocalizedName="sculpted.block")
@BlockInfo(textureName="sculpted", creativeTab=CreativeTabs.tabBlock, material=Material.stone)
public class SculptedBlock extends BlockContainer {


      public function addRecipes(List<IRecipe> recipes) {
      }
...

 

And then all the blocks, items, entities, fluids, etc contained within the mod package hierarchy get registered properly into the gameregistry.

 

The part of the code that does this is all implemented and working, however i'm running into the problem of distributing my mod, and it needs to include two other jars.

 

So the question is really, "What is the nicest way to do that ?"

 

I can always check for the classes and if they are not present, download and inject them into the mods folder. Is this a nice thing to do ?

 

I'm open for suggestions

 

 

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



×
×
  • Create New...

Important Information

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