Posted August 19, 201312 yr Hi guys, I wanted to take a very quick question. How do I create an API for my mod, so that other mods can use my items, blocks and machines? Thanks =)
August 20, 201312 yr For others to use your blocks and machines... That is easy. Forge has built in stuff for that I believe. But for the use of machines... I really can't be bothered to explain it all... I am sorry, school and no sleep are starting to bug me I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes. I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there
August 20, 201312 yr Do you want modders to interface with your machines, or just add recipes (I assume your machines are some sort of furnace, modified to fit your mod's theme), or maybe use them in recipes to make upgraded versions? Using Optionals would be a good place to start for actually getting a possible instance of the item or block. For recipes, you could add a method that does it using reflection. It really all depends on what you want modders to be able to do with your mod. My APIs generally don't provide the blocks and items for use, but they do usually provide ways to add custom behavior (MA allows mods to disable mashing, cloning, enchanting, and repairs; PR allows new special rewards, map types, teleport types, etc) and file listers. I'd recommend starting with Optionals, though.
August 21, 201312 yr Give interfaces and register methods, just like Forge I have an API for my mod similar to that. Have a look: https://github.com/mrkirby153/MscHouses/tree/master/common/mrkirby153/MscHouses/api http://i.imgur.com/gWwyMMO.jpg[/img]
August 21, 201312 yr most importantly generate your javadocs please how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
August 21, 201312 yr most importantly generate your javadocs please And what would I do with them once they're generated? http://i.imgur.com/gWwyMMO.jpg[/img]
August 21, 201312 yr you nake them accessible so we can read them how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
August 21, 201312 yr you nake them accessible so we can read them Yeah! This is vital to getting anyone to spend time on the API. This is a part of documenting the API, without documentation we who use your API can only GUESS on how it works. This means we will either spend hours in frustration, whine about it or most likely avoid using the API If you guys dont get it.. then well ya.. try harder...
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.