Skip to content

Foreword

Basic KubeJS Concepts

KubeJS scripts are written in JavaScript (JavaScript), so when using KJS (short for KubeJS in this course), you should know basic JavaScript syntax and concepts, including: data types, operators, conditionals, loops, and functions. If you only want to change recipes, you can skip deep JavaScript learning. If you want to build more complex logic, learning JavaScript is strongly recommended.

Also, most KJS modifications are event-driven: listen to an event, call methods from that event object, then apply your changes. You will see this pattern in later chapters. This is also one major difference between KJS and CraftTweaker.

Preparation

  1. Install (Visual Studio Code). See .
  2. Install the ProbeJS extension in VS Code (see the wiki for practical usage).
  3. Install the ProbeJS mod in-game as well (see the wiki for usage details).

You can skip these steps, but writing code will be less convenient.