Can you tell what do you see here? A "Mod Menu" mod? Yes, but no. Not exactly. Yeah, you probably already guessed - it is Mod Menu with Wurst codebase embedded inside. Don't ask me why, IDK. May be helpful in cases when staff member of server you were playing on sends you to cheats check procedure (you must not leave the server until the end of procedure else you will be banned; admin will call you in Discord and ask to share your screen with him to check your mods folder and to do a click on right shift using Windows' on-screen keyboard).
Most likely I will forget about this little project, but if anyone in the future wants to update to the latest version of Wurst, it is not very difficult to do:
1. Clone/download the Mod Menu and Wurst repositories.
2. Copy the wurstclient
directory from src/main/java/net/
to src/main/java/com/terraformersmc/modmenu
.
3. Create a directory src/main/resources/assets/wurst
in the Mod Menu repository and copy the contents from the Wurst repository directory src/main/resources/assets/wurst
there.
4. Replace all lines in all files with import net.wurstclient.
to import com.terraformersmc.modmenu.wurstclient.
. You may have to do the same for the package net.wurstclient.
lines, but Intellij Idea did it (refactored it) for me automatically.
5. Move the modmenu/wurstclient/mixin
directory to modmenu/mixin
(in Idea: RMB -> Refactor -> Move Package or Directory -> delete .wurstclient
-> click Refactor).
6. Open the file src/main/java/com/terraformersmc/modmenu/ModMenu.java
, find the onInitializeClient()
method and at the end of it (after the line ModMenuEventHandler.register();
) add the line WurstClient.INSTANCE.initialize( );
. If you are not in Intellij Idea, add import com.terraformersmc.modmenu.wurstclient.WurstClient;
at the beginning of the file.
7. Open the files src/main/resources/mixins.modmenu.json
and src/main/resources/wurst.mixins.json
(from the Wurst repo). From the wurst.mixins.json
file, copy all the lines after "client": [
up to the next closing square bracket and paste them at the end of the corresponding block in the mixins.modmenu.json
file. Don't forget to put a comma at the end of the line above the inserted lines.
8. Copy the file src/main/resources/wurst.accesswidener
from the Wurst repo to the MM repo in the same path. You can rename it to modmenu.accesswidener
🙂. Open the file src/main/resources/fabric.mod.json
(MM repo) and at the end of the file, before the "custom": {
line, add: "accessWidener": "modmenu.accesswidener",
.
9. Open build.gradle
file and after lines starting with includeMod
add another one: includeMod "fabric-api", fabricApi.module("fabric-networking-api-v1", project.fabric_version)
. Also, before the repositories
block, insert:
loom {
accessWidenerPath = file("src/main/resources/modmenu.accesswidener")
}
Optionally, correct the version string to match the latest Mod Menu release version. In the same file after apply from:
line add version = "v10.0.0-beta.1"
. Why? The version string of mod you built may contain the name of current git branch and you probably don't want it to be displayed, so use this dirty fix.
10. Build your Frankenstein Mod Menu project. Open a terminal in the root directory of the Mod Menu repository and enter the command .\gradlew.bat build
- Windows or ./gradlew build
- Linux (you may need to grant execution permission: chmod +x ./gradlew
). Intellij Idea users can run the build
task from the Gradle tool window.
FINALLY, you can copy the finished mod from the build/libs
directory (without -sources
suffix) to your mods dir. Don't forget to remove original Mod Menu and Wurst mods.
If you are too lazy to do this yourself, you can download the already built mod (Download Artifacts
button).