Minecraft.How
加载中...
跳至内容

KubeJS

作者 Lat

KubeJS lets creators write JavaScript scripts to modify recipes, add custom blocks and items, adjust world generation, and manage servers on Neoforge across Minecraft 26.1.2, 1.21.1, and 1.21.

我们的介绍

这个项目能做什么

Overview of KubeJS

KubeJS is a Minecraft mod created by Lat that enables game customization through scripts written in the JavaScript programming language. Distributed under the GNU Lesser General Public License v3.0, the mod falls into the Libraries & APIs and Utility & Quality of Life categories. Installation is optional on both the client side and the server side. It supports the Neoforge mod loader on Minecraft versions 26.1.2, 1.21.1, and 1.21.

The mod allows creators to manage servers, modify recipes, customize world generation, and add new blocks and items. Scripts can also manage tags, handle world events, and provide custom handlers or integrations with other mods such as FTB Quests.

Script Types and Reloading

Running the game once with the mod installed generates a kubejs folder containing example scripts in the Minecraft directory. The mod uses distinct script types for different tasks:

  • Startup scripts: These run once when the game loads and are used for registering items and setting up configs.
  • Server and data scripts: These load when joining a world and handle player or world tasks, such as displaying custom login messages or running clearlag.

Users can reload scripts with the /reload command. While some modifications work on the fly, certain changes require restarting the world or restarting the game.

Plugin Architecture and Java Integration

For addon developers, KubeJS features a plugin architecture configured through a kubejs.plugins.txt file. Plugins can execute actions during or after initialization, register custom recipe types, register custom event handler groups for scripts, and attach extra data to players, worlds, or the server. Addons can also add custom bindings ranging from constant values to Java class and method wrappers.

Scripts can access native Java types directly using Java.loadClass. Real talk, built-in filters prevent access to internal or dangerous packages, and developers can further customize allowed or denied classes through plugins or by providing a kubejs.classfilter.txt file.

Community and Support

Example scripts, pre-made scripts, and documentation can be found on the KubeJS Wiki. For additional assistance, bug reports, questions, and feature suggestions, users can participate in GitHub issues, GitHub discussions, and Discord support channels.

反应

登录后即可做出反应。

兼容性

版本与加载器

已记录 8 个版本

2101.7.2-build.377

release

下载 (2.2 MB)

26.1.2-8.0.6+neoforge

beta

下载 (2.1 MB)

26.1.2-8.0.5+neoforge

beta

下载 (2.1 MB)

2101.7.2-build.374

release

下载 (2.2 MB)

26.1.2-8.0.4+neoforge

beta

下载 (2.1 MB)

26.1.2-8.0.3+neoforge

beta

下载 (2.1 MB)

26.1.2-8.0.2+neoforge

beta

下载 (2.1 MB)

26.1.2-8.0.1+neoforge

beta

下载 (2.1 MB)

图库

KubeJS icon

我们使用 Cookie 来改善您的体验。继续使用本网站即表示您同意我们使用 Cookie。 阅读我们的隐私政策