Currently there is half-baked support for events and subscriptions in the HLAPI. The VM sends a subscribe message with the data of a peripheral UUID, and then the peripheral might send event messages back at any point in the future (until you send an unsubscribe message with the same UUID as the data). In the base mod this is currently only used by the Redstone Interface block, but it would be useful for more things in add-ons.
If North-Western-Development/oc2r#124 is accepted then events will be significantly more than half-baked, and it would be nice to have type-safe support here, not just the Micropython and Lua support I want to get into the base mod.
The on-the-wire format with my pull request is almost the same as the current one; the only change would be an extra confirmation event on successful subscription/unsubscription.
Currently there is half-baked support for events and subscriptions in the HLAPI. The VM sends a
subscribemessage with thedataof a peripheral UUID, and then the peripheral might sendeventmessages back at any point in the future (until you send anunsubscribemessage with the same UUID as thedata). In the base mod this is currently only used by the Redstone Interface block, but it would be useful for more things in add-ons.If North-Western-Development/oc2r#124 is accepted then events will be significantly more than half-baked, and it would be nice to have type-safe support here, not just the Micropython and Lua support I want to get into the base mod.
The on-the-wire format with my pull request is almost the same as the current one; the only change would be an extra confirmation event on successful subscription/unsubscription.