Does your mod need simple, configurable options? Do you not want to edit core Minecraft files to do this? Or did the mod you just download tell you to come here? If so, you're in the right place.
Regular users please go to the Installation section
Developers please go to the Developers section
Installation:
If you came here because a mod you want to use requires this API be installed, then follow these installation instructions for the client:
Copy moapi-1.6.2.zip to your mods folder (Location depends on which loader you are using)
Start up minecraft and play.
or these installation instructions for the server:
Copy the contents of moapi-1.6.2.zip to your minecraft_server.jar file
Start up minecraft and play.
Install older versions:
1. Find your minecraft.jar:
Windows: <your user folder>\AppData\Roaming\.minecraft\bin\ or
<your user folder>\Application Data\.minecraft\bin\
Mac: Home -> Library -> Application Support -> Minecraft -> bin
Linux: ~/.minecraft/bin/
2. Open the minecraft.jar file in WinRAR or 7zip (do not extract it)
3. Extract the contents of the ModOptionsAPI ZIP file.
4. Copy the files into your minecraft.jar
Note: Select the files AND folder "moapi" and drop them in,
do not open the folder "moapi" and copy those files separately,
it will make minecraft crash.
5. Delete META-INF folder IF it exists in the minecraft.jar
6. Install your other mods per their instructions.
7. Run Minecraft
Compatibility:
GuiAPI - Should remove GuiAPI button and add GuiAPI option under the Mod Options button.
ModLoader - MOAPI is compatible with it.
liteLoader - MOAPI is compatible with liteLoader.
FORGE - MOAPI is compatible with FORGE and FML.
Usage
Global Options
These options affect every world/server you are on (depending on how the mod is designed) and can be overridden by local options.
Local Options (server/world)
These options affect ONLY the world you are on, or the server. If they are set to GLOBAL they will use the value set in the global options. Otherwise, they override the global values.
If the option is not available in singleplayer, or multiplayer, the mod creator has choosen to disable it locally.
Finally, to put a value back to GLOBAL, right click it.
Developers
If you are a developer who wants to use this API, then read on.
NOTE: The package name was changed from moapi/moapi.gui in version 1.4.2 to moapi/moapi.client in version 1.5. These changes were made to allow a server version. There is now also a moapi.server package.
The Mod Option API (MOAPI) is designed to make it easier for users to change options for the mods they have loaded. It hooks into the option screens and gives the user a list of the mods that use the API and whichever options those mods expose. The user won't need to worry about editing config files directly anymore.
Even older versions can be found in the original author's thread.
Using this API:
Inside your "mod_*" file you need to do the following:
import moapi.*;
To create your options you need to do the following:
// Sets up an option entry for "Mod Name", mod options will be added underneath it.
options = ModOptionsAPI.addMod(options);
Then to add your options:
// Adds a toggle named "Enable Mod" and sets it's default value to false.
options.addBooleanOption("Enable Mod").setValue(false);
To get the option value, just check it with the following:
// Gets the value of the "Enable Mod" toggle, a boolean.
options.getBooleanValue("Enable Mod")
There are also slider options, text options, but boolean toggle options are pretty simple to use.
Screenshots (Just for the no pics, no clicks folks):
If anyone has trouble getting this mod to work, let me know and I will do what I can to figure out what is going on.
Permission is granted to include this mod into mod packs, just make sure to link back here.
You should as well put in the topic's title that this is an unofficial update of the Mod Options API so people would have an idea before they open this topic.
I have included the guiapi-patch source file in the developer version for those that need it to make the mod work with other mods or mod collections. (please do link back to this topic as well as the original authors, since this has the updated mod)
Rollback Post to RevisionRollBack
Have a mod with options? Mod Options API is the API for you. Let your users configure your mod options with ease.
After finally finding Nature Overhaul again after so long, I tried to readd it, noticing I needed the MOAPI I downloaded it and th e GUIAPI Patch. Before adding the patch I tried it, I got the same as I do after adding it...
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 81f1d9e3 --------
Generated 15/05/12 8:18 PM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_04, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce 9600 GT/PCIe/SSE2 version 3.3.0, NVIDIA Corporation
java.lang.NoClassDefFoundError: moapi/ModOption
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at ModLoader.setupProperties(ModLoader.java:1763)
at ModLoader.addMod(ModLoader.java:293)
at ModLoader.readFromModFolder(ModLoader.java:1276)
at ModLoader.init(ModLoader.java:887)
at ModLoader.addAllRenderers(ModLoader.java:189)
at ahu.<init>(RenderManager.java:86)
at ahu.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.a(Minecraft.java:394)
at net.minecraft.client.Minecraft.run(Minecraft.java:732)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: moapi.ModOption
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 13 more
--- END ERROR REPORT 8c36e47e ----------
After finally finding Nature Overhaul again after so long, I tried to readd it, noticing I needed the MOAPI I downloaded it and th e GUIAPI Patch. Before adding the patch I tried it, I got the same as I do after adding it...
These errors indicate the MOAPI is not loaded into your jar file. You have to copy all the files in the client version of MOAPI into your jar file, including the moapi folder, it needs to stay in the folder inside the jar file.
Rollback Post to RevisionRollBack
Have a mod with options? Mod Options API is the API for you. Let your users configure your mod options with ease.
These errors indicate the MOAPI is not loaded into your jar file. You have to copy all the files in the client version of MOAPI into your jar file, including the moapi folder, it needs to stay in the folder inside the jar file.
Odd could have sworn I had them int here, will try again...
So if this has been updated. when will Nature Overhaul be updated? I REALLY want that mod! I never got to try it before it went out of date D:
Nature Overhaul was updated by another person, however there are bugs they have not been able to work out. It's looking like the original author is coming back soon and hopefully we will be collaborating with him to get the mods updated and keep them up to date.
Rollback Post to RevisionRollBack
Have a mod with options? Mod Options API is the API for you. Let your users configure your mod options with ease.
Nature Overhaul was updated by another person, however there are bugs they have not been able to work out. It's looking like the original author is coming back soon and hopefully we will be collaborating with him to get the mods updated and keep them up to date.
I've been using this with Nature Overhaul, and I've run into an issue where, whenever I leave a world or close my game, all of the options for Nature Overhaul in the More World Options menu are reset to the default Global settings. I was just wondering if this is a bug in MoAPI, or if it might have been caused by one of the other mods that I have installed.
The Meaning of Life, the Universe, and Everything.
Join Date:
5/18/2011
Posts:
127
Member Details
This one still operational?
I ask because I need a version with a compatibility patch with guiapi.
The original author's update does not have one at the moment.
This one still operational?
I ask because I need a version with a compatibility patch with guiapi.
The original author's update does not have one at the moment.
Rollback Post to RevisionRollBack
Have a mod with options? Mod Options API is the API for you. Let your users configure your mod options with ease.
That would be awesome.. after a million headaches with my minecraft, I finally got everything right... just dealt with my first crash, going to put moapi after NatOver, see if that helps (I run magic launcher). Does anyone else have a problem with lumberjack?? It just does the same old floating-tree deal to me... But apples spawn and it seems like the world is growing, but I have everything set to average les i wreck this mockery of a computer I'm using.
Regular users please go to the Installation section
Developers please go to the Developers section
Installation:
If you came here because a mod you want to use requires this API be installed, then follow these installation instructions for the client:
Install older versions:
Windows: <your user folder>\AppData\Roaming\.minecraft\bin\ or
<your user folder>\Application Data\.minecraft\bin\
Mac: Home -> Library -> Application Support -> Minecraft -> bin
Linux: ~/.minecraft/bin/
2. Open the minecraft.jar file in WinRAR or 7zip (do not extract it)
3. Extract the contents of the ModOptionsAPI ZIP file.
4. Copy the files into your minecraft.jar
Note: Select the files AND folder "moapi" and drop them in,
do not open the folder "moapi" and copy those files separately,
it will make minecraft crash.
5. Delete META-INF folder IF it exists in the minecraft.jar
6. Install your other mods per their instructions.
7. Run Minecraft
Compatibility:
Usage
These options affect every world/server you are on (depending on how the mod is designed) and can be overridden by local options.
Local Options (server/world)
These options affect ONLY the world you are on, or the server. If they are set to GLOBAL they will use the value set in the global options. Otherwise, they override the global values.
If the option is not available in singleplayer, or multiplayer, the mod creator has choosen to disable it locally.
Finally, to put a value back to GLOBAL, right click it.
Mods using this API:
MOAPI is included in the Ultimate API Mod Pack.
Developers
If you are a developer who wants to use this API, then read on.
NOTE: The package name was changed from moapi/moapi.gui in version 1.4.2 to moapi/moapi.client in version 1.5. These changes were made to allow a server version. There is now also a moapi.server package.
Examples and source files are located on Github.
The Mod Option API (MOAPI) is designed to make it easier for users to change options for the mods they have loaded. It hooks into the option screens and gives the user a list of the mods that use the API and whichever options those mods expose. The user won't need to worry about editing config files directly anymore.
Older versions:
1.5.1 version
1.5 version
Client (1.4.6) version
Client (1.4.4) version
Client (1.4.2) version
Client (1.3.2) version
1.3.1 Client version
1.2.5 Client version
Even older versions can be found in the original author's thread.
Using this API:
Inside your "mod_*" file you need to do the following:
import moapi.*;
To create your options you need to do the following:
// Sets up an option entry for "Mod Name", mod options will be added underneath it.
options = ModOptionsAPI.addMod(options);
Then to add your options:
// Adds a toggle named "Enable Mod" and sets it's default value to false.
options.addBooleanOption("Enable Mod").setValue(false);
To get the option value, just check it with the following:
// Gets the value of the "Enable Mod" toggle, a boolean.
options.getBooleanValue("Enable Mod")
There are also slider options, text options, but boolean toggle options are pretty simple to use.
Screenshots (Just for the no pics, no clicks folks):
If anyone has trouble getting this mod to work, let me know and I will do what I can to figure out what is going on.
Permission is granted to include this mod into mod packs, just make sure to link back here.
What other mod(s) do you have loaded? If another mod replaced one of the class files, it would possibly have that effect.
Try moving MOAPI to after Nature Overhaul, I noticed he included some of the MOAPI files in his download, which may be causing conflicts.
I have included the guiapi-patch source file in the developer version for those that need it to make the mod work with other mods or mod collections. (please do link back to this topic as well as the original authors, since this has the updated mod)
Think I will be on here often? Haha no.
What mods are you loading? Do you have a crash report?
ModLoader 1.2.5
mod_4096Fix v4 for 1.2.5
mod_Armor 1.2.5
mod_BossCraft BossCraft 1.4.5
mod_BuildCraftCore 3.1.5
mod_BuildCraftBuilders 3.1.5
mod_BuildCraftEnergy 3.1.5
mod_BuildCraftFactory 3.1.5
mod_BuildCraftTransport 3.1.5
mod_BuildCraftSilicon 3.1.5
mod_CodeChickenCore 0.5.2
mod_CraftingTableIII (Beta1.5, MC1.2.5)
mod_mocreatures v3.6.1 (MC 1.2.5)
mod_IDResolver 1.2.5 - Update 0
mod_InvTweaks 1.41b (1.2.4)
mod_MinecraftForge 3.1.3.105
mod_ModLoaderMp 1.2.5v1
mod_lectern 1.2.5
mod_tome 1.2.5
mod_xpbook 1.2.5
mod_Zeppelin 1.2.5.0.30
mod_NotEnoughItems 1.2.2
mod_Railcraft 5.2.1
mod_RedPowerControl 2.0pr5b1
mod_RedPowerCore 2.0pr5b1
mod_RedPowerLighting 2.0pr5b1
mod_RedPowerLogic 2.0pr5b1
mod_chocobo 1.6.9
mod_RedPowerMachine 2.0pr5b1
mod_MineAndBlade Battlegear - 0.1.6.1 [1.2.5]
mod_Somnia v24 [1.2.5]
mod_ReiMinimap v3.0_06 [1.2.5]
mod_RedPowerWiring 2.0pr5b1
mod_RedPowerWorld 2.0pr5b1
mod_ChefCraftory 1.2.5
mod_FarmCraftory 1.2.5
mod_FishCraftory 1.2.5
mod_FruitCraftory 1.2.5
mod_GUICraftory 1.2.5
mod_SeasonCraftory 1.2.5
mod_Shelf 1.2.5
mod_stevescarts 1.2.0
mod_Timber 1.2.4
mod_TwilightForest 1.9.0
mod_HeroesGuild 1.3.0
mod_EE 1.4.4.0
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 81f1d9e3 --------
Generated 15/05/12 8:18 PM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_04, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce 9600 GT/PCIe/SSE2 version 3.3.0, NVIDIA Corporation
java.lang.NoClassDefFoundError: moapi/ModOption
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at ModLoader.setupProperties(ModLoader.java:1763)
at ModLoader.addMod(ModLoader.java:293)
at ModLoader.readFromModFolder(ModLoader.java:1276)
at ModLoader.init(ModLoader.java:887)
at ModLoader.addAllRenderers(ModLoader.java:189)
at ahu.<init>(RenderManager.java:86)
at ahu.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.a(Minecraft.java:394)
at net.minecraft.client.Minecraft.run(Minecraft.java:732)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: moapi.ModOption
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 13 more
--- END ERROR REPORT 8c36e47e ----------
These errors indicate the MOAPI is not loaded into your jar file. You have to copy all the files in the client version of MOAPI into your jar file, including the moapi folder, it needs to stay in the folder inside the jar file.
Nature Overhaul was updated by another person, however there are bugs they have not been able to work out. It's looking like the original author is coming back soon and hopefully we will be collaborating with him to get the mods updated and keep them up to date.
I ask because I need a version with a compatibility patch with guiapi.
The original author's update does not have one at the moment.
Awesome.
Thank you very much sir.