generated from Low-Drag-MC/ArchTemplate
-
Notifications
You must be signed in to change notification settings - Fork 9
KubeJS events
KilaBash edited this page Nov 2, 2024
·
6 revisions
All events can be found here:
W.I.P
Check MBDServerEvents
and MBDClientEvents
for all available machien events.
Because events will be posted to the Forge Event Handler as well. We wrap it with a KubeJS Event. So the actually event instance are shown here. Please check it for detials of fields and methods.
This is an example of using it.
MBDMachineEvents.onOpenUI("mbd2:machine_id", e => {
let event = e.event; // NOTE! you have to use it to get the actual event instance.
let machine = event.machine;
let machienID = machine.getDefinition().id();
console.log("Open UI!! id: " + machienID)
})