This repository is the scripting module of clientcommands. This mod is distributed as part of clientcommands, so please refer to clientcommands' readme for installation instructions.
Clientcommands Scripting is deprecated for removal in 1.19. JSMacros is the recommended replacement.
As this mod is a submodule of clientcommands, you must clone it as a submodule of clientcommands and work with it that way.
- Clone the clientcommands repository and submodules
git clone --recursive-submodules https://github.com/Earthcomputer/clientcommands cd clientcommands
- Generate the Minecraft source code
./gradlew genSources
- Note: on Windows, use
gradlew
rather than./gradlew
.
- Note: on Windows, use
- Import the clientcommands project into your preferred IDE.
- If you use IntelliJ (the preferred option), you can simply import the project as a Gradle project.
- If you use Eclipse, you need to
./gradlew eclipse
before importing the project as an Eclipse project.
- After importing, you should see the clientcommands module in the root project directory, and the clientcommands-scripting module under the
clientcommands-scripting
directory. Most of the time you will be editing files inside the clientcommands-scripting module, but feel free to edit files inside clientcommands if required for your feature.- Code inside clientcommands cannot reference code inside clientcommands-scripting, but code inside clientcommands-scripting can reference code inside clientcommands.
- To test clientcommands-scripting inside the IDE, you need to edit the run configuration that was generated by Fabric loom to run the clientcommands-scripting module. In IntelliJ, the option can be found here:
- After testing in the IDE, build a JAR to test whether it works outside the IDE too. Build clientcommands by running the following command in the root project directory
The mod JAR may be found in the
./gradlew build
build/libs
directory- Note: the build is currently slightly broken, in that you may need to run this command twice before the build is successful. So if the build fails, just run it again and it should hopefully succeed the second time.
- Create a pull request
so that your changes can be integrated into Clientcommands Scripting
- Note: for large contributions, create an issue before doing all that work, to ask whether your pull request is likely to be accepted
- Fork the Clientcommands Scripting repository and run
git push <your-fork-remote> master
inside theclientcommands-scripting
directory (not the root project directory). - If you made changes to clientcommands itself, fork clientcommands and push in the root project directory. Make clear in the pull request descriptions that the two are linked. Do not update the clientcommands scripting submodule in your clientcommands pull request, that will be done separately after the two are merged.