A while back, Mojang noted the creation of @minecraft/server Version 2.0.0-alpha. I hadn't messed with it until recently.
It looks like the worldInitialize event is gone and has been replaced by system.beforeEvents.startup:
import {system} from "@minecraft/server"
system.beforeEvents.startup.subscribe(
event => {
event.blockComponentRegistry.registerCustomComponent(
"test:a",
{onTick(event) {console.warn("New!")}}
)
}
)
I'm sure there are other changes, but this is the one that stands out the most to me. So far as I can tell, nothing has changed on the blocks side with registration — it's a scripting only change.
I guess the scripting team felt registrations had a better home in system than in world? Personally, I like the change.
Attached is the exports list from @minecraft/server, to those that are curious. I'm sure someone has/can emit something more robust to look into V2.