@bedrock-oss/bedrock-boost
    Preparing search index...

    Class EntitySaver

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Removes all structures with the specified prefix.

      Parameters

      • prefix: string

        The prefix to remove.

      Returns void

    • Loads an entity from the structure.

      Parameters

      • id: number

        The ID of the structure without the prefix.

      • prefix: string

        The prefix used for the structure.

      • dimension: Dimension

        The dimension to load the entity in.

      • location: Vec3

        The location to load the entity at.

      • OptionalremoveStructure: boolean

        Whether to remove the structure after loading.

      Returns undefined | Entity

      The loaded entity, or undefined if the entity was not found.

    • Saves an entity to the structure.

      Parameters

      • entity: Entity

        The entity to save.

      • prefix: string

        The prefix to use for the structure.

      • OptionalremoveEntity: boolean

        Whether to remove the entity after saving.

      Returns number

      The ID of the structure without the prefix.