Events
All events can be found here:
Registry Events
W.I.P
Machine Events
Check MBDServerEvents and MBDClientEvents for all available machine events.
Because events will be posted to the Forge Event Handler as well. We wrap it with a KubeJS Event. So the actual event instance are shown here. Please check it for details of fields and methods.
This is an example of using it.
javascript
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)
})