This application reads the SRG/CSV files generated by MCPMappingViewer or http://modcoderpack.com and generates mappings for classes, fields, and methods. It also includes an SDK generator that generates C++ files for the chosen mappings, to use in a C++ project with JNI. The project uses thread pooling and parallelism, even though it is not strictly necessary since the main functions only perform disk reads/writes.
- Go 1.16 or later
- Clone this repository.
- Run
yarn build
in the root directory of the project. - The executable file will be generated in the same directory.
- Place the SRG/CSV files generated by MCPMappingViewer in the
data/mappings/<version>
directory. You can get it inuser.home
>.cache/MCPMappingViewer
><version>/stable
or just download it from ModCoderPack. - Run the executable file.
- The output files will be generated in the
out/
directory.
out/classes.txt
: a list of all the classes and their mappings.out/fields.txt
: a list of all the fields and their mappings.out/methods.txt
: a list of all the methods and their mappings.
You can modify it to your use case
out/sdk
: here will be generated the sdk files (you need to set what classes/fields/methods that you want ininternal/constants
(ik that's hardcoded, I will implement a better way to set it, prolly jsons))
This project is licensed under the MIT License - see the LICENSE.md file for details.
SDK Generation
[X] Fix function overloading when the only difference is the return type. [X] Pass env on constructor (shared_ptr return types) [?] Load mappings on each class instead using a global mapping manager - aka g_mapper [?] A way to get the return type of Fields, or just get it by inference [X] getClass should have the path in params