Skip to content

Scans mods to find classes and members that aren't in Patchwork API yet

License

Notifications You must be signed in to change notification settings

PatchworkMC/AreWePatchworkYet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AreWePatchworkYet?

AreWePatchworkYet? is a tool that takes a Forge mod jar file, and lists unimplemented fields and methods based on an inputted Patchwork API jar file. It's designed to see which methods need to be implemented in Patchwork API for a mod to work.

Note that results provided by this tool are not guaranteed - there may be unimplemented fields/methods it may miss, or other things a mod will require such as AT/AWs or coremods.

Setup

At the moment, prebuilt binaries are not available. You'll need to clone this repo and build it manually, assuming you have a JDK installed. If you don't have a JDK, grab one from AdoptOpenJDK.

git clone https://github.com/stairman06/arewepatchworkyet.git
cd arewepatchworkyet
gradlew run

Usage

The leftmost panel is called the Configuration Panel. It's where you configure settings.

Minecraft Version

Self explanatory, the version of Minecraft you're using. This is required as Minecraft is automatically downloaded and remapped.

Input mod

This is the input mod, or the one you want to test and see all the unimplemented methods it references. This is a path relative to the current directory.

The input mod needs to be patched through patchwork-patcher. Eventually, this will be done automatically.

Patchwork API jar

A relative path to the Patchwork API jar you're using. To get Patchwork API, compile it from source.

Mappings to display in

Items displayed will be displayed in the chosen mappings. By default, this is set to intermediary. Support for SRG/MCP will be added soon.

When you've configured all settings, press Analyze, and the mod jar will be analyzed and compared with the Minecraft and Patchwork API jars to see which methods are missing.

Technical Details

AreWePatchworkYet? works using the ASM bytecode analysis library.

First, it looks through the Minecraft and Patchwork API jars to see which fields/methods are defined, and stores them in an internal map.

Second, it looks through the input mod jar to see which methods are referenced. If a field or method is referenced that isn't defined, its stored to be displayed for later.

AreWePatchworkYet? also handles Mixin classes that add methods, by looking for the @org/spongepowered/asm/mixin/Mixin annotation, and storing the added fields or methods.

License

This tool is licensed under the GNU Lesser General Public License version 3.0.

About

Scans mods to find classes and members that aren't in Patchwork API yet

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages