your current location:首页 > news>[K js] KU Be js Minecraft

[K js] KU Be js Minecraft

2024-12-12 09:14:27|Myriagame |source:minecraft skins

Overview

What is the role of this module?

This module allows you to use the JavaScript language to create a script to manage the server, add new blocks and items, change the formula, add custom processing programs to the task module, and change the world generator!

How to use this module?

Run the game once after you install the module.It should generate a Kubejs folder with an example script in your Minecraft directory.Starting scripts run only once when the game is loaded, these are used for registered items, setting configuration, etc.When you join a world, the server/data script will be loaded. These scripts are more suitable for clearing delay, displaying custom login messages, and general world/player related content.

What should I do if I won't use JavaScript?

There are examples and pre -made scripts on Kubejs Wiki.‎

Can I carry my script?

Startup_scripts: Restart the game or use /kubejs relaxed startup_scripts.Not all content can be reloaded, and some contents need to restart the game (such as registry) or the world (such as the world generator).

Server_scripts: Use /RELOAD heavy load script, formula, label and all data packets, or use /kubejs recoad server_scripts.

Client_scripts: Use F3 + T to overload scripts and resource packages, or use /kubejs relaxed client_scripts only overloaded scripts.

How does this module work?

It uses Mozilla's JavaScript engine Rhino for fork, which converts the JS code into a Java class during runtime.Kubejs encapsulated the Minecraft class and added some practical programs to greatly simplify the operation and eliminate the demand for mapping.Architectury allows almost the same source code for Forge and Fabric, which makes transplantation very easy.


Note: The versions of 1.20.2 will no longer support FORGE and Fabric, only Neoforge, so the Architectury API is no longer needed as the front.

Who knows that its 1.7.10 version is called CommandScripts?