senth / minecraft-mod-manager Goto Github PK
View Code? Open in Web Editor NEWInstall and update mods from CurseForge and Modrinth through a CLI
License: MIT License
Install and update mods from CurseForge and Modrinth through a CLI
License: MIT License
When installing new mods, automatically download and install dependencies.
Can't install or update mods that don't specify a mod-loader. For example jei
Running minecraft-mod-manager install jei
returns "No new version found"
If no mod-loader version is specified in the files/version, it shouldn't be filtered out.
Things would be faster if the mods were downloaded and installed in parallel.
Currently, we're getting all the mod information from the curse website. This is a bit slow since it has to load the entire page. It also easily breaks if there are changes to the site.
Instead, we want to use Curse's official API to get mod information and update.
This will also solve #10
After #75, #76, and #89 will be implemented, you won't really get a good overview of the changes that will happen.
After fetching all updates etc, (need to be after fetching the updates since we don't know the version before the file has been downloaded). But before deleting the old files and doing any changes. Display a summary of all changes that will happen (update, disable, enable) and ask for confirmation.
It's important to note here, that if the user presses Ctrl+C we have to intercept it and quit the program gracefully, otherwise there will be duplicate mod files downloaded. One solution would be to place it in a temp directory, or something similar before actually deleting or removing it.
Add an option --yes -y
to skip asking for confirmation.
Show real data for instances and mod information. Not just stub data.
When i try to use minecraft-mod-manager it gives me the following error:
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\xmb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts\minecraft-mod-manager.exe_main.py", line 4, in
File "C:\Users\xmb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\minecraft_mod_manager_main.py", line 1, in
from .adapters.repo_impl import RepoImpl
ModuleNotFoundError: No module named 'minecraft_mod_manager.adapters'
System: Windows 10 Build 19042.928
Python: version 3.8.9
Currently, it only downloads from the first site it finds and doesn't check the others.
Changes required
Not sure how to identify these, but sometimes source-file releases are picked over useful files... e.g. https://www.curseforge.com/minecraft/mc-mods/mouse-tweaks/files/3202662
It's hard to know when there's a new update to minecraft-mod-manager
.
It would be good if it automatically told you through GUI and CLI that a new version is available.
A clear and concise description of any alternative solutions or features you've considered.
For Windows or even all platforms, it would also be good if it could automatically update itself. Another feature.
While updating mods, shulkerboxtooltip didn't upgrade although there was a newer version out. The problem seemed to be that the installed version doesn't exist in CurseForge anymore. I also think the installed version was updated through mcman.
Steps to reproduce the behavior:
mcman update -v 1.17.1
Should update shulkerboxtooltip from 3.0.0-alpha4 -> 3.0.0
Design and create the first draft of all mods in a Minecraft instance.
Use Material design for everything
2.0.0 -> 2.0.1
Add tabs or something similar for changing between multiple Minecraft instances.
Maybe do some research on a good way to display the tab.
When trying to update dynmapforge it doesn't update to the latest beta version even though --allow-beta is used.
For example, if you download unearthed-fabric, it will pull from curse, but store in the sqlite as simply unearthed, requiring a further configure unearthed=unearthed-fabric
in order for an update to work in the future.
I'm totally new to python scripts and pip, but I did:
pip3 install --user minecraft-mod-manager
(and tried pip2 and pip with same result)
and got this error:
Could not find a version that satisfies the requirement minecraft-mod-manager (from versions: )
No matching distribution found for minecraft-mod-manager
No idea how to fix this. Searching around doesn't seem to have any solutions.
When there are updates and you run --pretend
it gets the version from the file. But since there's no file to read it can't get the updated version.
Steps to reproduce the behavior:
mcman install -v 1.16.5 carpet
mcman update --pretend
Should display the updated version and not throw an error
Display the version from the VersionInfo
if --pretend
. And it should not try to load the file info during --pretend
Tried updating all mods and it showed errors on several mods
Failed to parse mod file mods\CraftTweaker-fabric-1.18.2-9.1.127.jar
Traceback (most recent call last):
File "C:\Users\redacted\AppData\Roaming\Python\Python310\site-packages\minecraft_mod_manager\gateways\jar_parser.py", line 50, in _get_mod_info
with ZipFile(file, "r") as zip:
File "C:\Users\redacted\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1240, in __init__
self.fp = io.open(file, filemode)
FileNotFoundError: [Errno 2] No such file or directory: 'mods\\CraftTweaker-fabric-1.18.2-9.1.127.jar'
!!! Please report this and paste the above message !!!
โ Corrupted file.
Steps to reproduce the behavior:
minecraft-mod-manager.exe --pretend -d mods -v 1.18.2 --mod-loader=fabric update
Will show mods to be updated
Hello, I am quite unsure of how this module is meant to be used. I am running on python 3.9.2 on Windows 10. Firstly, I am unsure of how to import the module. import minecraft-mod-manager
does not work, which is somewhat expected, but import minecraft_mod_manager
does. There is no indication that I could find that this is how to import it, if it even is the way to import it, if it even is meant to be imported. Then, if I try to use one of the example code things, minecraft-mod-manager install mod_name
, rather than tell me that there is no mod called mod_name or something, it instead throws a SyntaxError exception. I also tried the example mmm update
with the same result. I really can not at all understand how this is meant to be used, and how the commands are meant to work. Perhaps an example file/multi-line code block thing that shows the process for installing a mod called mod_name would clarify this process? It is entirely possible (and likely) that I'm just being a derp and missing an obvious thing here, and if I am, I apologise, but an example code would clarify the process IMO.
Create a GUI Window using Kivy that starts when no arguments are supplied.
When you install a mod via the mod manager and then delete it from the folder and try to install it again via the manager it says the mod is already installed.
I had thinked about an uninstall command line to delete the mod from the database as a possible solution.
Two problems:
I am trying to install this mod called Entity Culling Fabric/Forge using minecraft-mod-manager install entityculling
but it doesn't seem to find it:
entityculling
๐บ Mod not found on any site...
Mod entityculling not found on any site.
Check so that it's name is correct. Or you can set the name by running:
minecraft-mod-manager configure entityculling=NEW_NAME
Trying minecraft-mod-manager install curse:entityculling
doesn't seem to work either:
entityculling
๐บ Mod not found on any site...
Mod entityculling not found on curse.
Check so that it's name is correct. Or you can set the name by running:
minecraft-mod-manager configure entityculling=NEW_NAME
Note that there is another similar mod that is forge only but has a dash in between it (entity-culling
).
However when I download this other mod, it does not appear when doing minecraft-mod-manager list
, and so I cannot update it.
Am I missing something or doing something wrong?
This issue contains all high-level information about the next version (v2 - the GUI Update).
Using the command line is unintuitive for people that aren't used to using command lines. To make this script appeal to the masses it needs to have a GUI that works intuitively.
It should take less than one minute for everyone to update mods from the very first run of the program. And it should just work.
While it's a high vision to have, it should work in most scenarios. But there are some hurdles. Mainly that CurseForge doesn't have a good search engine. But that might be fixed by using alternative search engines #91
These are not part of the v2 update. but logged here to remember them.
Below you can see the status of all v2 tasks. You can also check out v2 Project site for a Kanban view of the project.
When v2 is released.
An improvement to enable/disable a mod (#75) would be to allow the ability to check for updates and automatically enabled the mods if there are updates.
mcman update
will automatically update all disabled and incompatible mods
The current code is a coupled mess. This makes it hard to extend the functionality and add tests.
To make it a lot easier to change endpoints or implement new functionality in the future migrate the project to clean architecture.
While migrating also add tests.
If I installed a mod with the --beta flag and later run mcman update
it doesn't update that mod unless I specify --beta
, but then I get beta releases for all mods.
Tag each downloaded mod with the current stability, and when updating include those stabilities for that specific mod. For example, when if install with --beta
it will search both beta and stable releases. If a stable release is found to be the latest, it will change the tag to stable for that mod.
Remove the entire alpha/beta system and always download the latest. It might be that everyone always wants to download the latest, regardless of the stability.
Most Minecraft players don't have python installed. In order to appeal to the masses, an executable version of the script should be available for download.
File "/home/username/.local/bin/minecraft-mod-manager", line 10, in
sys.exit(main())
File "/home/username/.local/lib/python3.8/site-packages/minecraft_mod_manager/main.py", line 16, in main
installed_mods = DirParser.get_mods()
File "/home/username/.local/lib/python3.8/site-packages/minecraft_mod_manager/dir_parser.py", line 18, in get_mods
mod = DirParser.get_mod_info(file)
File "/home/username/.local/lib/python3.8/site-packages/minecraft_mod_manager/dir_parser.py", line 27, in get_mod_info
with zip.open("fabric.mod.json") as json_file:
File "/usr/local/lib/python3.8/zipfile.py", line 1514, in open
zinfo = self.getinfo(name)
File "/usr/local/lib/python3.8/zipfile.py", line 1441, in getinfo
raise KeyError(
KeyError: "There is no item named 'fabric.mod.json' in the archive"
After updating all mods dynmap was updated to a forge-version instead of the fabric version that was used.
Removes the mod when using --pretend
Run mcman update --pretend
all mods that can be updated would be deleted
Does not delete mod
I am trying to install Inventory HUD+ by doing minecraft-mod-manager install inventory-hud-forge
and it silently exits with this output:
inventory-hud-forge
It doesn't seem to be installed after that.
For stability sake, we might want to add some integration tests, that test installing and updating mods.
Additionally, I could not list my mods afterward because of the duplicate files:
Traceback (most recent call last):
File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\sqlite.py", line 138, in insert_mod
self._connection.execute(
sqlite3.IntegrityError: UNIQUE constraint failed: mod.id
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Python39\Scripts\minecraft-mod-manager.exe\__main__.py", line 7, in <module>
File "c:\python39\lib\site-packages\minecraft_mod_manager\__main__.py", line 21, in main
repo = RepoImpl(jar_parser, sqlite, downloader)
File "c:\python39\lib\site-packages\minecraft_mod_manager\adapters\repo_impl.py", line 26, in __init__
self.mods = self.db.sync_with_dir(jar_parser.mods)
File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\sqlite.py", line 65, in sync_with_dir
self.insert_mod(mod)
File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\sqlite.py", line 151, in insert_mod
raise ModAlreadyExists(mod)
minecraft_mod_manager.core.errors.mod_already_exists.ModAlreadyExists: Mod architectury already found in the the db.
Great project @Senth! Besides CurseForge, there's now a second page that serves Minecraft mods.
And their API is very well documented: https://github.com/modrinth/labrinth/wiki
When implemented, it should be next to impossible to accidentally download a Forge version for Fabric, and vice versa.
There's even categories that show if the mod is useful on clients, servers or both.
Keep up the good work!
Currently, if a mod has support for both forge and fabric and we're using the install method. It will pick the latest one and you don't have the ability to select whether you want the Fabric or Forge version.
--fabric
and --forge
to override the majority role or when using the first time without any pre-installed mods.Crashes when you list with Item Model Fix installed.
To reproduce:
minecraft-mod-manager install item-model-fix
minecraft-mod-manager list
Error:
Traceback (most recent call last):
File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Python39\Scripts\minecraft-mod-manager.exe\__main__.py", line 7, in <module>
File "c:\python39\lib\site-packages\minecraft_mod_manager\__main__.py", line 21, in main
repo = RepoImpl(jar_parser, sqlite, downloader)
File "c:\python39\lib\site-packages\minecraft_mod_manager\adapters\repo_impl.py", line 26, in __init__
self.mods = self.db.sync_with_dir(jar_parser.mods)
File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\jar_parser.py", line 30, in mods
mod = JarParser.get_mod_info(file)
File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\jar_parser.py", line 42, in get_mod_info
mod = JarParser._parse_fabric(zip)
File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\jar_parser.py", line 60, in _parse_fabric
object = json.load(json_file)
File "c:\python39\lib\json\__init__.py", line 293, in load
return loads(fp.read(),
File "c:\python39\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "c:\python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "c:\python39\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 7 column 55 (char 153)
By default, it always searches CurseForge first and then Modrinth. Some might want to download from Modrinth first
When using minecraft-mod-manager list
it shows sites as unknown
if they haven't been set.
Sites should not be printed if they are set as unknown
It cannot find CurseForge only mods very easily. I pretty much always have to configure the mod manually.
It should search on other sites like FiberMC for fabric etc which can provide the CurseForge link to the mod.
I just manually configure new mods that are only on CurseForge.
Make the installation interactive if no mod is found so that the user can select the mod from the search result
Sometimes the tool deletes mods when it definitely should not. Over time this effect can delete almost an entire mods folder.
Steps to reproduce the behavior:
minecraft-mod-manager list
and ensure the tool can see all 40 modsminecraft-mod-manager update
After step 4, all 40 mods should remain intact
When updating, the jar names are used instead of the mod name specified when installing.
mcman install cull-leaves
Installs the jar file: cullleaves-2.2.0.jar
mcman update
Outputs:
cullleaves
๐บ Mod not found on any site...
It should remember the names of the installed mods.
minecraft-mod-manager
seems like a very long command to type out. Maybe an alias like mcman
or something? (I could add this in my config myself, but it is sensible to add this by default)
Minecraft Mod Manager is downloading an older version of Sodium than the one installed.
sodium
๐ข Updated 0.3.0+build.483 -> 0.2.0+build.4
The build I have installed is a newer build from github with a higher version number. Still, the latest version available on Curse/Modrinth is being downloaded.
Steps to reproduce the behavior:
mcman update
Minecraft Mod Manager should compare the installed version number to the latest available version and only download an update if the number is greater.
During Minecraft updates, some mods take a bit longer to update. Instead of having to remove them, it would be great to have an easy way to enable/disable a few mods.
mcman disable dynmap carpet
mcman enable dynmap
mcman enable
(enables all mods).disabled
to the filename (to be consistent with MultiMC)Should also be easy to do in the GUI
Currently if there are two or more mods with the same id the application will crash.
The application can't add multiple mods with the same id to the database
Copied from #54
Traceback (most recent call last):
File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\sqlite.py", line 138, in insert_mod
self._connection.execute(
sqlite3.IntegrityError: UNIQUE constraint failed: mod.id
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Python39\Scripts\minecraft-mod-manager.exe\__main__.py", line 7, in <module>
File "c:\python39\lib\site-packages\minecraft_mod_manager\__main__.py", line 21, in main
repo = RepoImpl(jar_parser, sqlite, downloader)
File "c:\python39\lib\site-packages\minecraft_mod_manager\adapters\repo_impl.py", line 26, in __init__
self.mods = self.db.sync_with_dir(jar_parser.mods)
File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\sqlite.py", line 65, in sync_with_dir
self.insert_mod(mod)
File "c:\python39\lib\site-packages\minecraft_mod_manager\gateways\sqlite.py", line 151, in insert_mod
raise ModAlreadyExists(mod)
minecraft_mod_manager.core.errors.mod_already_exists.ModAlreadyExists: Mod architectury already found in the the db.
Design and implement the GUI side of the update all button. Use stub information for now.
Currently users have no easy way of telling which version of minecraft-mod-manager they have installed. This makes it a bit harder to pinpoint if a problem still exists or not, or if they simply have an older version.
Add a --version
option to print your installed version of minecraft-mod-manager.
Fabric capes mod throws UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 194-195: invalid continuation byte
The manager will always crash if this mod is present
To reproduce, run minecraft-mod-manager --mod-loader fabric install capes
Then, run minecraft-mod-manager list
to see the crash
Encountered on Ubuntu Linux
Throws an exception when reading invalid JSON from the API response
From #60
I think this is probably a related issue with the same symptom.
minecraft-mod-manager install shulkerboxtooltip
throws:
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
using version 1.2.1
There is no way to track mods that have not yet updated to a specific version and install them when they release.
There are two solutions I have considered, the first one is preferrable for me, but either would be great
mcman update
with a version flag (or potentially an additional force
flag) rename mods that aren't compatible with the specified version to <modfilename>.disabled
(for consistency with multimc. If mcman update
is run again, and a mod that was previously disabled for being outdated now has an updated version, download the new version and remove the mod.jar.disabled
filemcman update
is run, and if so, download that version.I have considered storing them in a separate directory and running mcman update
occasionally in that directory to see if they update, but it would be more convenient to have it all in one directory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.