Unknown Detection Party's core library for editing Minecraft written in Java. The core comes with a powerful mapping API that allows you to easily make facade's for minecraft classes and reference them just like you would in a typical forge mod. Compiling is easy and handled by maven, you can find further instruction on compilation and usage below.
UDP-Java is fairly easy to set up as most of the process is handled automatically by maven.
- Make sure you have the JDK, Minecraft, and Maven installed.
- Clone/download the repository then open it in your IDE
- For eclipse you open the project via
File > Import > Maven > Existing Maven Project
- For eclipse you open the project via
- Change the target version (Minecraft version to modify, default is 1.13.0, see notes in MappingGen when running for versions after 1.12.2)
- Open
\src\main\java\mapping\MappingGen.java
- Modify the version string to whichever version you want to target.
- Version must either be supported by MCP (use the MCPOnlineJsonGen) or by Forge (use the MCPJsonGen)
- If the version is supported by MCP, just run it. You can find the supported version list here.
- If the version is supported only by forge, download the forge MDK and install it as if you were going to make your own mod (This downloads important files that the tool uses to generate mappings. You can delete the downloaded forge files after running their install script)
- Open
- Run
\src\main\java\mapping\MappingGen.java
to generate your mappings file for the targeted version (printed in console)- Paste contents of output into
\src\main\resources\cfg.json
(This is the mappings of obfuscated names from that Minecraft version to our API's facades) - Make sure to refresh the project in your IDE so it detected the changes in the file (You can refresh a project by selecting it and hitting F5)
- Paste contents of output into
- Open a console in the root directory (Wherever you downloaded the project)
- Run the command
mvn clean package
- This creates
%root%\target\
which contains the compiled jar files.
- This creates
- Open the Minecraft launcher and create a new profile
- Add these two arguments to the jvm-arguments
-noverify
(noverify not needed, but suggested if you plan on expanding the bytecode manipulation capabilities of the api)-javaagent:<path/to/UDPMinecraftClient-agent.jar>
- Example of my jvm-args:
-client -noverify -javaagent:D:\Java\UDP\JavaCore\target\UDPMinecraftClient-agent.jar -Xmx2G -Xms2G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy
- Set the game version to match what your agent was built off of.
- Add these two arguments to the jvm-arguments
- Save the profile and launch the game
- Plugins are loaded from
.minecraft/udp/plugins/
- For developing plugins see the following tutorial: Plugin Development
- Plugins are loaded from
Please make sure that your launcher profile is set to keep the logging window open. This way you can easily see the UDP log contents on the fly. The log is also saved to .minecraft/udp/log.txt
when the game exits.
Examples:
// loading
UDP[INFO]: Loading injection config
UDP[INFO]: Loading plugins
// plugin failed to load because of the @plugin annotation not supporting the given version
UDP[ERROR]: Removed 'HookTest' - Does not support game version '1.12.2-OptiFine_HD_U_C9'
// these plugins all loaded correctly
UDP[INFO]: Loaded 'examples'-'Fastmine'
UDP[INFO]: Loaded 'examples'-'Fly'
UDP[INFO]: Loaded 'examples'-'KillArea'
UDP[INFO]: Loaded 'examples'-'Hud'
// keybinding successfully loaded
UDP[INFO]: Registering binds
// The facade was loaded successfully
UDP[INFO]: Injecting facade 'Minecraft' over 'bib'
// The facade had a method with a mapping annotation, but it was not found in the `cfg.json`.
// This is fine if your facade contains methods for multiple versions of the game (like Timer).
UDP[DEBUG]: Missing getter for: bih#getSpeed
UDP-Java is build on the following libraries and frameworks:
- Java 8
- Objectweb ASM: 5.2
- Google Guava: 22.0
- Google Gson: 2.8.1
- (if you edit 1.12 and below)
- (if you edit 1.13 and above)
Please read the contributing guide for details on how to create proper contributions through pull requests and issues.
- bloo
- Hooking API (A majority of the client essentially)
- Plugin API
- GenericSkid
- Plugin API
- Event system