Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Earthcomputer/clientcommands-scripting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clientcommands Scripting

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.

Deprecated for Removal

Clientcommands Scripting is deprecated for removal in 1.19. JSMacros is the recommended replacement.

Contributing

As this mod is a submodule of clientcommands, you must clone it as a submodule of clientcommands and work with it that way.

  1. Clone the clientcommands repository and submodules
    git clone --recursive-submodules https://github.com/Earthcomputer/clientcommands
    cd clientcommands
    
  2. Generate the Minecraft source code
    ./gradlew genSources
    
    • Note: on Windows, use gradlew rather than ./gradlew.
  3. Import the clientcommands project into your preferred IDE.
    1. If you use IntelliJ (the preferred option), you can simply import the project as a Gradle project.
    2. If you use Eclipse, you need to ./gradlew eclipse before importing the project as an Eclipse project.
  4. 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.
    1. Code inside clientcommands cannot reference code inside clientcommands-scripting, but code inside clientcommands-scripting can reference code inside clientcommands.
  5. 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: Image showing where to edit the module of a run configuration
  6. 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
    ./gradlew build
    
    The mod JAR may be found in the 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.
  7. 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 the clientcommands-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.

About

JSMacros Scripting API for clientcommands

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages