Script API - v1.21.90.25
    Preparing search index...

    Module @minecraft/server-gametest - v1.0.0-betaBeta

    The @minecraft/server-gametest module provides scriptable APIs for scaffolding and testing content experiences in Minecraft.

    Manifest Details

    {
    "module_name": "@minecraft/server-gametest",
    "version": "1.0.0-beta"
    }

    @minecraft/common (Optional in Manifest Details)

    • Requires v1.0.0 or above
    {
    "module_name": "@minecraft/common",
    "version": "1.0.0"
    }

    @minecraft/server (Required one of the following in Manifest Details)

    • Requires v1.17.0 up to, but not including, v2.0.0
    {
    "module_name": "@minecraft/server",
    "version": "1.17.0"
    }
    • Requires v2.0.0 up to, but not including, v3.0.0
    {
    "module_name": "@minecraft/server",
    "version": "2.0.0"
    }

    Install type definition for @minecraft/server-gametest module using npm:

    npm i @minecraft/server-gametest@1.0.0-beta.1.21.90-preview.25
    

    Enumerations

    GameTestErrorType
    LookDuration

    Classes

    FenceConnectivity

    Returns information about whether this fence is connected to other fences in several directions.

    GameTestError
    GameTestSequence

    Executes a set of steps defined via chained .thenXyz methods, sequentially. This facilitates a 'script' of GameTest setup methods and assertions over time.

    RegistrationBuilder

    A utility class to set GameTest parameters for a test. Methods can be chained together to set multiple properties.

    SculkSpreader

    Implements a class that can be used for testing sculk spreading behaviors. This sculk spreader class can drive the growth of sculk around a particular block.

    SimulatedPlayer

    A simulated player can be used within GameTests to represent how a player moves throughout the world and to support testing of how entities and the environment will react to a player. This type derives much of its structure and methods from the minecraftserver.Player type. Note that many types of events that may be available for entities more broadly, such as item use events, may not fire in the same capacity for simulated players.

    Tags

    These well-known tags can be used to classify different tests into suites to run.

    Test

    Main class for GameTest functions, with helpers and data for manipulating the respective test. Note that all methods of this class expect BlockLocations and Locations relative to the GameTest structure block.

    Interfaces

    GameTestErrorContext
    MoveToOptions

    Functions

    register
    registerAsync