When your contribution is complete, submit it to this repository via a pull request.
Enable Haxe Formatting and Haxe Checkstyle to maintain code quality in your contributions.
When developing code for accessing Minecraft, or interoperating between different Minecraft versions:
- Place the code within the
net.minecraftpackage. - Try to maintain module and class names wherever possible, to keep the interface familiar.
- If you need to rename a class, consider making an API in
net.pickhaxeinstead.
- If you need to rename a class, consider making an API in
- You may wish to copy and modify an auto-generated extern, from the
net.minecraft_draftspackage. - You may also copy code from Haxe's generated externs; when running
pickhaxe build, add--dumpto generate these. - Note that you may need to modify classes to interoperate between Minecraft versions. If you do, make functions extern or inline where possible, to simplify the generated codebase.
- When using compile defines to distinguish Minecraft versions, use the auto-generated defines (
#if minecraft_gteq_1_19_3) where possible. This will ensure compatibility across snapshots, which do not match well with string comparisons of versions. - If you create a new class (one that is not an extern), place it in the
net.pickhaxe.compatclass and typedef it over!- Otherwise, the class will generate in the
net.minecraftclass, and Forge will fail when loading the JAR as a module.
- Otherwise, the class will generate in the
When developing code for accessing Fabric:
- Place the code within the
net.fabricmcpackage.
When developing code for accessing Forge:
- Place the code within the
net.minecraftforgepackage. - Keep in mind that Minecraft Forge has a quirk, where no two JARs can share any packages.
When developing code to interoperate between Forge and Fabric:
- Place the code within the
net.pickhaxepackage, then call
If you are developing code for other purposes, such as interacting with common mod APIs, these should be placed in OTHER repos!
- For example, Mixin support is planned to be included via a
pickaxe-mixinlibrary. - Integration with commonly used mods, such as JEI and WAILA, are great contributions but should be maintained in separate haxelibs (like
pickhaxe-waila)