Contributing
Contributions are always welcomed, in any form.
For non-developers
You are welcome to:
Ask questions, share experiences, and request features on the GitHub Discussions page.
Submit bugs or something not working to the GitHub issues page.
Submit new translations here.
For developers
We have reworked the project structure in 1.20.4, we may separate them to describe it.
Prerequisite
A Java IDE that supports Gradle (IntelliJ IDEA is recommended).
Understanding of Java, Gradle, Minecraft, ModLoaders(Forge/NeoForge/Fabric), and Bukkit.
Arclight is based on SpongeMixin. Understanding how to write Mixins and how they work is important.
Setting up the workspace
After 1.20.4:
Clone this project and import it into a Java IDE.
Before 1.20.2:
Clone this project first, and in the project folder, run gradlew remapSpigotJar. When it's done, import this project into your IDE and refresh it.
To build Arclight, run gradlew remapSpigotJar idea first and run gradlew build. If you have not built it before, you need to run gradlew build again.
Refer to https://gist.github.com/IzzelAliz/ddac7f3f1a82dd19d28e29b1da33aac1 for setting up a mojmap spigot workspace.
Project structure
After 1.20.4:
The
arclight-commoncontains most of the codes.The mixins are in
io/izzel/arclight/common/mixinpackage.The bridges provide the interface among our mixins and platforms, they are implemented in mixins.
The other codes including the remapper are in the
io/izzel/arclight/common/modpackage.
The
arclight-forgearclight-neoforgearclight-fabriccontains platform-specific codes, its structure is similar to thearclight-common.The
bootstrapbundles subprojects to a server jar.The
installerwill install mod loaders automatically at run time.The
buildSrcis used for remapping the spigot jar in the developing environment.The
i18n-configcontains multi-language translations of arclight.
Before 1.20.2:
The
arclight-apicontains codes that are not related to Minecraft.The
arclight-commoncontains most of the codes.The mixins are in the
io/izzel/arclight/common/mixinpackage.The bridge classes bridge the gap between Minecraft and Bukkit, which are implemented in mixins.
The other codes including the remapper are in the
io/izzel/arclight/common/modpackage.
The
arclight-forgecontains forge-specific mixins.The
forge-installercontains the code to install Forge and bundle arclight as a server jar.The
buildSrcis used for remapping the spigot jar in the developing environment.The
i18n-configcontains multi-language translations of arclight.
Code style
In general, follow Google Java Style.
Mixins should follow this implementation policy: mixin method names and bridge class names
Shadows should be wrapped using
@formatter:off/onfor readability
Tips
Before 1.20.2:
You can find bukkit <-> srg mappings in
build/arclight_cache/tmp_srg/bukkit_srg.srgonce you built the project
Reminder to upgrade the Minecraft version
Following steps:
Update Minecraft and mod-loader versions in
build.gradle.Change the Bukkit version in
arclight-common/build.gradle.Check the upstream commits, all from SpigotMC, MinecraftForge, NeoForged, and FabricMC.
Update resource files, including
async-catcher.json,arclight.accesswidener(don’t forget to remove the duplicate entries in AW).Upload new library files to
arclight.mcxk.net.