Jump to content

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


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?




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

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.

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.


  • Create New...

Important Information

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