Documentation is still in progress. Please join our Discord server for help.
Completed 69%
Scripting
Setup

Setup

💡

You must install the Java Development Kit (JDK) to create and use scripts!

Installing the Java Development Kit

To compile Java scripts, you need to install a Java Development Kit (JDK). While your system may have a Java Runtime Environment (JRE), it only runs Java applications and lacks the tools for compilation.

You can download the Java 8 JDK from Oracle (opens in a new tab). If you prefer not to create an Oracle account, use this alternative download link (opens in a new tab).

Setting the Java Executable

On Windows, the Java executable is typically located at
C:\Program Files\Java\jdk<your-version>\bin\javaw.exe.

To configure the Java executable in the default Minecraft Launcher, follow these steps:

1. Navigate to the "Installations" tab in the launcher interface.
2. Locate the launch profile for which you want to set the Java executable.
3. Click the button with three dots on the right-hand side of the launch profile.
4. Select "Edit" from the drop-down menu.
5. Click "More Options" to expand and reveal additional settings.
6. In the "More Options" section, find the "Java executable" field.
7. Paste the path to javaw.exe corresponding to your Java installation into the field.

Creating Scripts

⚠️

Raven scripts are written in Java, so your code must be in a .java file.

  • Use a code editor like Brackets or Visual Studio Code for writing scripts.
  • Place all scripts in the scripts folder to use them. Files starting with an underscore _ will not be recognized as valid scripts.

Using Scripts

The GUI has a category labeled "Scripts" where all scripts in your scripts folder are displayed.

  • To add scripts, click the "Open Folder" button in the Manager module and drag your scripts into the folder.
  • Whenever you add or modify a script, press the "Load Scripts" button to apply the changes.
  • If a script contains errors, it will appear in red and cannot be enabled. An error message will also appear in the chat window with specific details.

Scripting API

The Raven scripting API provides classes and methods to interact with the game world and perform various tasks. It's designed to be user-friendly, even for beginners.

As this client is an addition to Raven b4, we have included additional features in the scripting API. You can find the API documentation here. For the rest of the documentation, visit Blowsy's original Raven b4 docs by clicking here (opens in a new tab).