• Generates a sphere.

    Parameters

    • center: Vector3

      The location of the center of the sphere.

    • radius: number

      Radius of the sphere.

    • dimension: Dimension

      The dimension to generate the sphere in.

    • block: (location: DimensionLocation, index: bigint) => BlockPermutation

      The function to determine the BlockPermutation to generate.

    • Optionaloptions: {
          matchingBlock?: string;
          matchingBlockStates?: Record<string, string | number | boolean>;
          minMSBetweenYields?: number;
          verifyBlockActuallyChanged?: boolean;
      }

      Optional extra options for the sphere generation execution.

      • OptionalmatchingBlock?: string

        The type of the block mask to match.

      • OptionalmatchingBlockStates?: Record<string, string | number | boolean>

        The block states of the block mask to match.

      • OptionalminMSBetweenYields?: number

        The shortest the generation can run for before pausing until the next tick.

      • OptionalverifyBlockActuallyChanged?: boolean
    • replacemode: boolean = false

      Whether or not to clear container blocks before replacing them.

    • integrity: number = 100

      The integrity of the sphere generation.

    Returns Promise<
        {
            completionData: {
                containsUnloadedChunks?: boolean;
                done: boolean;
                endTick?: number;
                endTime?: number;
                startTick: number;
                startTime: number;
            };
            counter: number;
        },
    >

    A promise that resolves with the details of the sphere generation once the sphere generation is complete.

    Legacy function. Superceeded by fillSphere.

    1.18.0-development.26

    1.0.0