I've noticed that all gui for disabling mods is present but, the code for doing so is not. Is this something that is planned to happen in the future?
It is already working, it's up to mods to support it. Most can't use it though because they have blocks and items
What do you have to do to get it to work then? I looked at the GuiModList.java and it doesn't have any actions for clicking disable. I'm currently using 1722.
As I said, most mods can't use it because they add blocks and items (which REQUIRE a restart). Some minor aesthetic mods (to my knowledge) can do it, but it all has to be coded in by the mod itself - it's not a forge issue
Ok, I'm have trouble get the button to do anything, then. What is necessary to get Forge to turn the mod off? I set canBeDeactivated to true but, the only visable change was the Disable button was then Black rather than Red.
The button simply does not have an action in GuiModList. But one can use ActionPerformedEvent to do something on button press. But the button first needs to be activated via button.enabled = truefor the event to fire.
So does that simply mean that forge isn't allowing mods to be deactived in this manner and if so why have the button?
In 1.9 @Mod.canBeDeactivated() is not even used anywhere.
Loader.runtimeDisableMod(modId) is not called either.
That method isn't called in 1.8.9 for 1722. But it was the only location that I found that calls the FMLModDisabledEvent via LoadController#disableMod()
This led me to believe that Disabling Mods in game is simply not supported at this time. If this is true, will it ever be?
Technically it is supported, the framework seems to be there, but it is not implemented or thoroughly tested.
That's what I saw as well. I just called it not supported do to the inability to do it in game. Do you know if there is any reason why this is?
I told shit
I found it
??
It does a few things, like changing the color of the button (as you said). I missed that while I was looking.
The main point is that it can forcefully change the Disableabilty of your mod based on dependencies.
But still: no button listener.
Commit: https://github.com/MinecraftForge/MinecraftForge/commit/751c5e39a485b95fd6a5dfcef02429739eedb561
I wouldn't mind trying to get this to work but, it'd have to wait until my current mod gets to beta in a month or two.
All done by @cpw in the end of 2013 while revamping a lot of Forge's codebase.
I just know that coremods with a ModContainer can be disabled when returning false in registerBus(EventBus bus) call.
I left it dead because as has been pointed out, 99% of mods can make no use of it. I frankly have billions of other activities that are a priority and negative infinity time. This has gotten left by the wayside. Actually removing it would take time I don't have too..
As I pointed out before, after I get my current project to beta, I could get this working. Perhaps with a restart inquiry? So, many other Mods could use it too.
@diesieben07 added labels [Feature]
This issue has been automatically marked as stale because it has not had activity in a long time, and will be closed if no further activity occurs. If this issue was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.
This will definitely be removed in the fml rewrite cpw is working on right now for 1.13.
@mezz @cpw Is there a public repo for the FML rewrite that we can view? or is it all private to keep out debates on how it should work?
You can see some stuff on cpw's github like the modlauncher progress:
https://github.com/cpw/modlauncher
and coremods system: https://github.com/cpw/coremods
There is more that is not public yet, he showed and talked about some on his stream but I do not see any video recordings unfortunately. https://mixer.com/voxcpw
Most helpful comment
You can see some stuff on cpw's github like the modlauncher progress:
https://github.com/cpw/modlauncher
and coremods system: https://github.com/cpw/coremods
There is more that is not public yet, he showed and talked about some on his stream but I do not see any video recordings unfortunately. https://mixer.com/voxcpw