Jump to content

New to Forge and FML; question re: capabilities [never mind]


super_aardvark

Recommended Posts

I also haven't done much modding in Minecraft in general.  Many moons ago I made a simple patch to let mobs break blocks, mostly as a coding exercise/intro to modding.

 

Now I've created a tiny mod that will replace a broken tool with another one from your inventory.  (I was getting tired of opening up my inventory every time my pick broke.)  I did this with MCP alone, but I want to make it available to others and have it play nicely with other mods.  It seems like that's what a mod loader like FML is for... am I right?

 

From the little I've read so far about MCForge, it seems like it's mostly designed to help people add new blocks, items, that kind of thing.  This mod is a small patch (about 8 new lines) to EntityPlayer.java.  If you're just dropping new files into minecraft.jar, my mod will obviously conflict with any other mod that touches that file.  Can I use Forge to package my mod in a way that can be merged with other mods?

 

Thanks

 

EDIT:  Ok, I'm on my way to answering my own question... found this in the Forge version of EntityPlayer, where my code change went:

MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(this, orig));

  I think I saw something about events on the wiki... I'll check there.

 

EDIT 2: Got it working.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

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