Skip to content
This repository was archived by the owner on Jun 7, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Clientcommands Scripting
This repository is the scripting module of [clientcommands](https://github.com/Earthcomputer/clientcommands). This mod is distributed as part of clientcommands, so please refer to clientcommands' readme for installation instructions.

This repository is the scripting module of [clientcommands](https://github.com/Earthcomputer/clientcommands). This mod is distributed as part of clientcommands, so please refer to clientcommands' readme for installation instructions. As of 1.18 [JSMacros](https://github.com/wagyourtail/JsMacros) is required and client commands scripts must use the namespace cc to access functions. For example, you must now use `cc.print("hello")` instead of just `print("hello")`. Scripts should now be put in `.minecraft/config/jsmMcros/Macros`.

## 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
```
```
git clone --recursive-submodules https://github.com/Earthcomputer/clientcommands
cd clientcommands
```
1. Generate the Minecraft source code
```
./gradlew genSources
```
```
./gradlew genSources
```
- Note: on Windows, use `gradlew` rather than `./gradlew`.
1. 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.
Expand All @@ -22,10 +24,10 @@ As this mod is a submodule of clientcommands, you must clone it as a submodule o
1. 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](https://user-images.githubusercontent.com/13084089/124387081-10077100-dcd5-11eb-826e-c84f717eafcc.png)
1. 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
```
./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.
1. [Create a pull request](https://help.github.com/en/articles/creating-a-pull-request)
so that your changes can be integrated into Clientcommands Scripting
Expand Down
Loading