Bedrock Energistics Core
    Preparing search index...

    Function init

    • Beta

      Initializes this package. Some APIs require this to be called. Must be called after worldLoad.

      Parameters

      • uid: string

        A unique ID. Must be between one and MAX_ROUTER_UID_LENGTH characters (see mcbe-addon-ipc).

      Returns void

      uid is passed straight to mcbe-addon-ipc's Router as its own unique ID. Two routers sharing an ID will receive each other's messages, so if your add-on constructs a Router of its own, give it an ID different from the one passed here. Anything identifying your add-on works, as long as nothing else in the world uses it.

      Throws a PublicError of type PublicErrorType.InvalidState if this package has already been initialized, if Bedrock Energistics Core is not in the world, or if called before worldLoad.

      Throws a PublicError of type PublicErrorType.InvalidArgument if uid is empty or too long.