Skip to content

v2.0.0

Latest
Compare
Choose a tag to compare
@OmniacDev OmniacDev released this 02 Nov 02:10
· 57 commits to main since this release

Release v2.0.0

A lot has been optimized and re-implemented, so this version will be incompatible with any previous versions.

NET Module

The NET module has been heavily refactored, some key changes including:

  • Custom data serialization, fully optimized for scriptevents
  • Payload has been moved into the scriptevent ID, to maximize data throughput
  • Scriptevent ID is now fully serialized, allowing completely custom namespaces, and supporting the payload
  • Event listeners have been optimized to minimize delay
  • Data fragmentation has been heavily optimized, reducing memory and time usage

For advanced users, the NET module is also now available for use.

import { system } from '@minecraft/server'
import { NET } from './IPC/ipc'

// This listener will behave like IPC.once
const listen_terminator = NET.listen('namespace', 'event', 'channel', function* (args) {
    console.log(args[0]) // 'args'
    listen_terminator() // terminate listener
})

system.runJob(NET.emit('namespace', 'event', 'channel', ['args']))

What's Changed

Full Changelog: v1.7.0...v2.0.0