your current location:首页 > news>event js mineCraft

event js mineCraft

2024-12-15 01:25:14|Myriagame |source:minecraft skins

Too long

The most significant feature of EventJS is that you can refresh the Kubejs monitoring of the Forge event without restarting the game. You only need to carry out a script overload (such as the command /kubejs reload startup_scripts).

Eventjs

It is a subsidiary of [KJS] Kubejs, which adds the heat load support for Kubejs with thermal load support for primary event monitoring.

With EventJS, you do not need to restart the entire game, nor do you need to use a "Global ['Someid" "storage monitoring function to refresh your monitoring of the native event.

Similarly, you can add/delete the monitoring of native events without restarting the game. This is what the Kubejs version supported by EventJS has not been able to do it.

Use

By default, EventJS will replace the original native event monitoring, so as to add heating heavy load support.

Therefore, you can enjoy the benefits of eventjs without learning anything new.

However, if you need some more dynamic, more conducive to customized, and more complete native events monitoring, you can use "NativeEvents.onevent (...)" monitoring incident, or "nativeEvents.ongnericeVent (...)"Generic Event.

"NativeEvents" is available in all three script types (scripttype), which is available in the CLIENT_SCRIPTS/Server_Scripts/Startup_scripts), so you can use this to add event to the client/server, which means to listen to listening, which meansFor example, if you add a monitoring of an event alone in the "client_scripts", this event monitoring will not occur on the server.

Grammar (version 1.1.0)

 NativeEvents.onevent (eventType, Handler) nativeEvents.onevent (Priority, Receivecancelled, EventType, Handler) NativeEvents.ong EnericeVENT (GENERICLASSTYPE, EVENTTYPE, HANDLER) NativeEvents.OongnericeVent, EventType, Handler) 

"Handler" on the JS side is the monitoring function of the event, such as "(event) => {...}", "eventType" and "GenecclasStype"String or loaded by "java (...)" or "java.loadclass (...)" itself.

Support version

Version 1.0.0: 1.16.5.

Version 1.1.0: 1.16.5, 1.18.2, 1.20.1.

It is planned to support all the main versions of all 1.16 to 1.20. If there is a lack of support, please wait patiently :)

Do you know

The author's motivation to make this MOD is that Kubejs has been dragged to 1.21 before adding the thermal load support of the primary event monitoring. However, this can be realized as early as the 1.16 period (even earlier, until the 1.12 period).The author was really angry, so he wrote this module himself.

Although EventJS and 1.21+ Kubejs is not different from the JavaScript side on the hot -load event monitoring, but the specific implementation is not consistent. Remember not to take it for granted when interacting with EventJS on the Java side.

Minecraft images

The goal of MC Encyclopedia (MCMOD.CN) is to provide players with a better environment for MOD learning and research, and accept and cultivate more hardcore players.Provide Minecraft (Minecraft) MOD (module) item data introduction, tutorial strategy and MOD download, and is committed to improving the player's game experience.About the encyclopedia Encyclopedia help development log Donate Encyclopedia to follow the encyclopedia B station = "Fa Fa-Anagle-Right"> Opinions feedback Email © CopyRight Mc Encyclopedia 2013-2024 mcmod.cn |

Minecraft images

Minecraft images

In addition to other statements, MCMOD.CN, all open public editing content uses the BY-NC-SA 3.0 protocol.