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

    Module @minecraft/server-editor - v0.1.0-betaBeta

    Manifest Details

    {
    "module_name": "@minecraft/server-editor",
    "version": "0.1.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 in Manifest Details)

    • Requires v2.1.0-beta or above
    {
    "module_name": "@minecraft/server",
    "version": "2.1.0-beta"
    }

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

    npm i @minecraft/server-editor@0.1.0-beta.1.21.90-preview.25
    

    Enumerations

    ActionTypes

    The types of actions that are supported. This type corresponds to the expected arguments passed by the onExecute handler of an action.

    Axis
    BlockMaskListType
    BlockPaletteItemType
    BlockTableOperationType

    The possible operation types supported by BlockTable property item.

    BoolPropertyItemVariant

    The possible variants of a bool.

    ButtonPropertyItemVariant

    The possible variants of a Button property item.

    ColorPickerPropertyItemVariant

    The possible variants of a color picker.

    ComboBoxPropertyItemDataType

    The possible data types supported by ComboBox property item.

    ContiguousSelectionType
    ContinuousActionState

    Execution state of the continuous action

    CoreActionBarItemType

    Predefined action bar items

    CoreBrushShapeType

    Core brush shape types

    CoreMenuType

    Predefined top level menus for core editor

    CursorControlMode

    An enumeration used by the 3D block cursor Cursor

    CursorTargetMode

    Describes how the cursor targets a point on the screen.

    DaylightCycle
    EditorInputContext

    Global editor input contexts

    EditorMode

    Enumeration representing the different modes Editor can be in.

    EntityOperationType
    ExportResult
    GamePublishSetting
    GraphicsSettingsProperty

    Enumeration representing identifiers for graphics settings properties.

    ImageResourceType

    Supported image types.

    InputModifier

    Input modifier flags to create chorded bindings

    KeyboardKey

    Keyboard key

    KeyProcessingState

    Determines how key binding should be processed to fire actions

    LayoutAlignment

    Alignment options for UI elements

    LayoutDirection

    Layout directions for property panes.

    MouseActionCategory

    Mouse device action categories

    MouseActionType

    Detailed mouse device actions

    MouseInputType

    Input event information about mouse actions

    NumberPropertyItemVariant

    The possible variants of a Number property item.

    PaintCompletionState
    PaintMode
    Plane
    PlaytestSessionResult
    PrimitiveType
    ProgressIndicatorPropertyItemVariant

    The possible variants of a ProgressIndicator property item.

    ProjectExportType
    PropertyItemType

    Type of item that can be added to the property pane

    SelectionVolumeEventType
    SimpleToolStatusBarVisibility

    Define the visibility of the status bar item If the tool does not have an ISimpleToolPropertyPane component, then this option is ignored

    SpeedSettingsProperty
    SplineType
    StatusBarAlignment

    Position for items on the status bar

    ThemeSettingsColorKey
    WidgetComponentType
    WidgetGizmoEventType
    WidgetGroupSelectionMode
    WidgetMouseButtonActionType
    WorldGeneratorType

    Classes

    BedrockEventSubscriptionCache

    A cache for bedrock event subscriptions. Stores off a subscription by event key, and upon teardown unregisters all subscriptions.

    BlockIdentifierListObservableValidator

    Validates observable objects that support string list as BlockType

    BlockIdentifierObservableValidator

    Validates observable objects that support string as BlockType

    BlockPalette
    BlockPaletteManager
    BlockUtilities
    BrushShape

    Base for creating new brush shapes

    BrushShapeManager
    ClipboardChangeAfterEvent
    ClipboardChangeAfterEventSignal
    ClipboardItem

    A ClipboardItem is a handle to an object which represents a set of blocks in a contained bounding area (most likely copied from the world)

    ClipboardManager

    The ClipboardManager (accessible from the ExtensionContext) is responsible for the management of all ClipboardItem objects, and provides the user the ability to create new ClipboardItem objects for use within an extension.

    ConeBrushShape

    Base for creating new brush shapes

    CuboidBrushShape

    Base for creating new brush shapes

    CurrentThemeChangeAfterEvent
    CurrentThemeChangeAfterEventSignal
    CurrentThemeColorChangeAfterEvent
    CurrentThemeColorChangeAfterEventSignal
    Cursor

    The 3D block cursor is controlled through this read only object and provides the Editor some control over the input methods, display properties and positioning of the 3D block cursor within the world. The 3D block cursor is a native object which is constantly calculating a screen/mouse -> world raycast, and recording the resultant block collision position and facing direction. Depending on the properties of the cursor state, this is not always true – the cursor can also be manually manipulated by keyboard input and moved around independently of mouse movement; when the mouse is moved, the block cursor will return to the mouse/world ray intersection point. The cursor can also be set to either block or face mode; block mode represents the block the mouse is pointing at, and face mode represents the adjacent block that the mouse is pointing at (i.e. the block attached to the face of the intersection point). In practical use, each tool when activated grabs the current cursor state object and stores it. The active tool then sets the current state to represent the functionality of the tool (color, input mode, etc). When the tool loses focus, it restores the cursor state using the stored state object that was grabbed during activation. The 3D block cursor can also be used to query the current block at which the mouse is pointing (or the current block to which the cursor has been manually moved by the user)

    CursorPropertiesChangeAfterEvent
    CursorPropertyChangeAfterEventSignal
    CylinderBrushShape

    Base for creating new brush shapes

    EditorConstants
    EditorStructureManager
    EllipsoidBrushShape

    Base for creating new brush shapes

    EntityIdentifierObservableValidator

    Validates observable objects that support string as EntityType

    ExportManager
    Extension

    Editor Extensions are the basis for all player specific, editor specific functionality within the game. Almost all editor functionality is exported and available within the context of an ExtensionContext When the script manager initializes during level loading, the scripts are loaded from the behavior packs and executed. As part of the global execution context, the scripts are free to register any number of extensions. An Editor Extension is defined a name, an activation function and a shutdown function.

    ExtensionContext

    The extension context is a native (C++) object created for each registered Editor Extension, when a player connection is established with the server. A registered extension activation or deactivation closure is accompanied by an [ExtensionContext] object, which provides a player specific, editor extension specific context. The Extension Context is the main interface to all the bound Editor Services. As more player services are added to the editor, they will be exposed through this object

    ExtensionContextAfterEvents

    Contains a set of events that are available across the scope of the ExtensionContext.

    GraphicsSettings

    Settings category that manages GraphicsSettingsProperty configurations.

    IBlockPaletteItem
    InvalidWidgetComponentError
    InvalidWidgetError
    InvalidWidgetGroupError
    Logger

    The logger class is a utility class which allows editor extensions to communicate with the player from the server to the client log window. The logger class presents 4 different output channels which can be used to send information to the client/player, depending on the context of the information.

    MinecraftEditor

    The MinecraftEditor class is a namespace container for Editor functionality which does not have any player context.

    ModeChangeAfterEvent

    Contains information related to changes in player editor mode.

    ModeChangeAfterEventSignal

    Manages callbacks that are connected to when a player editor mode changes.

    NumberLimitObservableValidator

    Validates min/max limits of observable objects that support number

    ObservableValidator

    Used for validating an observable value before it gets set

    PlaytestManager
    ProbabilityBlockPaletteItem
    PyramidBrushShape

    Base for creating new brush shapes

    RelativeVolumeListBlockVolume

    Base type for BlockVolumes.

    SelectionChangeAfterEventSignal
    SelectionContainerBase
    SelectionContainerEntity
    SelectionContainerVolume
    SelectionContainerVolumeEvent
    SelectionEventAfterEvent
    SelectionManager

    The SelectionManager (accessible from the ExtensionContext) is responsible for the management of all @minecraft/server-editor.Selection objects, and provides the user the ability to create new @minecraft/server-editor.Selection objects for use within an extension.

    SettingsManager

    The SettingsManager (accessible from the ExtensionContext) is responsible for the management all player settings.

    SimpleBlockPaletteItem
    SimpleToolWrapper

    A simple class wrapper to inherit in your tool which contains the initialization and storage of the simple tool component utility. See one of the Simple samples to see how to use this class and the wrapper framework

    SimulationState

    Responsible for querying and modifying various properties of the simulation.

    SingleBlockBrushShape

    Base for creating new brush shapes

    SpeedSettings
    ThemeSettings
    TransactionManager

    The Transaction Manager is responsible for tracking and managing all of the registered transaction operations which represent creator changes in the world. Transaction Manager is the basis of the UNDO and REDO operations, and allows a creator to store the changes made to the world and the state of the world BEFORE those changes were applied, making it possible to UNDO those changes and restore the world state. The transactions are stored as a stack, and can be undone in stack order to restore the world to it's original state

    UserDefinedTransactionHandle

    A strongly typed transaction handle to enforce type safety when adding user defined transactions.
    This transaction handle becomes the context for adding the transaction to the transaction manager.
    You can obtain one of these handles by calling registerUserDefinedTransactionHandler

    UserDefinedTransactionHandlerId
    Vector3LimitObservableValidator

    Validates min/max limits of observable objects that support Vector3

    Widget
    WidgetComponentBase
    WidgetComponentBoundingBox
    WidgetComponentBoundingBoxStateChangeEventParameters
    WidgetComponentClipboard
    WidgetComponentEntity
    WidgetComponentGizmo
    WidgetComponentGizmoStateChangeEventParameters
    WidgetComponentGuide
    WidgetComponentRenderPrimitive
    WidgetComponentRenderPrimitiveTypeAxialSphere
    WidgetComponentRenderPrimitiveTypeBase
    WidgetComponentRenderPrimitiveTypeBox
    WidgetComponentRenderPrimitiveTypeDisc
    WidgetComponentRenderPrimitiveTypeLine
    WidgetComponentSpline
    WidgetComponentText
    WidgetComponentVolumeOutline
    WidgetGroup
    WidgetManager
    WidgetMouseButtonEventData
    WidgetStateChangeEventData

    Interfaces

    ActionManager

    Binds actions to the client and manages their lifetime. Action managers are managed on a per player basis since client side UI is per player.

    BlockMaskList
    BuiltInUIManager

    Represents a UI session for a given player

    ClipboardWriteOptions

    Interface used to specify the options when a clipboard item is being written to the world

    ContiguousSelectionProperties
    CursorPosition
    CursorProperties

    The CursorProperties interface is used to describe the properties of the Editor 3D block cursor construct. The 3D block cursor can be queried to retrieve the current properties, and the same property class can be used to set the current properties of the cursor. This interface is generally used at the activation stage of the active tool to set up the color, visibility and input properties of the 3D block cursor

    CursorRay
    EditorStructure
    EditorStructureSearchOptions
    EventSink

    An event that can be subscribed to. You can use the token, returned from the subscribe method, to clean up handlers.

    ExtensionOptionalParameters

    An interface which defines the set of optional parameters which can be used when calling the registerEditorExtension function

    GameOptions
    IActionBar

    Manager for IActionBarItem objects.

    IActionBarItem

    Registered item handle in the Action Bar collection.

    IActionBarItemCreationParams

    Properties required to create an Action Bar item.

    IBlockListPropertyItem

    A property item which supports block list properties

    IBlockListPropertyItemOptions

    Optional properties for Bool property item

    IBlockTableEntryInfo

    Block Table Entry info for block table property item

    IBlockTablePropertyItem

    A property item which supports Block Table properties

    IBlockTablePropertyItemOptions

    Properties of block table item

    IBoolPropertyItem

    A property item which supports boolean properties

    IBoolPropertyItemOptions

    Optional properties for Bool property item

    IButtonPanePropertyItem

    A property item pane which supports multiple buttons

    IButtonPanePropertyItemOptions

    Optional properties for Button Pane property item

    IButtonPropertyItem

    A property item which supports Button properties

    IButtonPropertyItemOptions

    Optional properties for Button property item

    IColorPickerPropertyItem

    A property item which supports Color Picker properties

    IColorPickerPropertyItemOptions

    Optional properties for Color Picker property item

    IColorTimelinePropertyItem

    A property item which supports Color Timeline properties

    IColorTimelinePropertyItemEntry

    Properties of color timeline property item entry

    IColorTimelinePropertyItemOptions

    Optional properties for Color Timeline property item

    IComboBoxPropertyItem

    A property item which supports Combo Box properties

    IComboBoxPropertyItemOptions

    Optional properties for ComboBox property item

    IDataTablePropertyItem

    A property item which supports data entries displayed in a table

    IDataTablePropertyItemEntry

    Properties of data table property item menu entry

    IDataTablePropertyItemOptions

    Properties of data table item

    IDisposable

    Simple abstraction for disposable objects.

    IDropdownPropertyItem

    A property item which supports Dropdown properties

    IDropdownPropertyItemEntry

    Properties of dropdown property item menu entry

    IDropdownPropertyItemOptions

    Optional properties for Dropdown property item

    IEventToken

    Returned from an event subscription. Provides functionality for cleaning up listeners

    IGlobalInputManager
    IImagePropertyItem

    A property item which supports Image properties

    IImagePropertyItemOptions

    Optional properties for Image property item

    ILinkPropertyItem

    A property item which supports Link properties

    ILinkPropertyItemOptions

    Optional properties for Link property item

    IMenu
    IMenuContainer

    Manager and container for IMenu objects

    IMenuCreationParams

    Properties required to create a Menu

    IModalControlPane

    A sub pane for modal control elements.

    IModalOverlayPane

    A modal overlay pane is displayed over a root pane.

    IModalOverlayPaneOptions

    The options to create a modal overlay pane.

    IModalTool
    IModalToolContainer
    INumberPropertyItem

    A property item which supports Number properties

    INumberPropertyItemOptions

    Optional properties for Number property item

    INumberTimelinePropertyItem

    A property item which supports Number Timeline properties

    INumberTimelinePropertyItemEntry

    Properties of the Number timeline property item entry

    INumberTimelinePropertyItemOptions

    Optional properties for Number Timeline property item

    IObservable

    Represents a stateful value that can be observed by different objects.

    IPane

    Pane represents a container for UI components.

    IPlayerLogger

    Log helper interface for Player.

    IProgressIndicatorPropertyItem

    A property item which supports ProgressIndicator properties

    IProgressIndicatorPropertyItemOptions

    Optional properties for progress indicator property item

    IPropertyItemBase

    Common base for all property items

    IPropertyItemOptionsBase

    Common optional properties for property items

    IPropertyPane

    Property pane present dynamic content. It can be associated with an object and presented with different kind of controls.

    IPropertyPaneOptions

    Common optional properties used for constructing a property pane.

    IRegisteredKeyBinding

    Key binding that is registered to an input context

    IRegisterExtensionOptionalParameters

    Optional parameter definition for RegisterEditorExtension function Allows the extension registrar to specify optional textual description and notes which would be visible through the extension manager

    IRootPropertyPane

    A root pane that can store property items.

    IRootPropertyPaneHeaderAction

    Represents the data to display an action button on a root property pane header.

    IRootPropertyPaneOptions

    The options to create a root pane.

    ISimpleTool

    The simple tool wrapper will create, bind and manage the lifecycle of all the desired components. The wrapper is designed to obfuscate and simplify the process of creating a simple editor tool so that a creator can get on with the job of just creating the tool functionality without getting mired in the irrelevant details of component lifecycle and visibility management. The wrapper will also attempt to codify particular implementation patterns and requirements that are common to all editor tools, and enforce them in a consistent way. It should also go some way to insulating the creator from underlying system and implementation changes as the editor evolves.

    ISimpleToolKeyBinding

    Define a key binding for the simple tool activation

    ISimpleToolOptions

    A set of options which define the basic properties of a simple tool, and the optional components that are desired.

    ISimpleToolPaneComponent

    The Simple Tool pane component represents the main window (or sub-window) for an editor tool. The pane components are stored as a hierarchy (see the ISimpleToolPaneOptions interface for more details) and are the main containers for all of the UI controls used by the editor tool. Panes are optional (a tool doesn't necessarily need to have a pane), but if a pane is present, then it is one of two type - Modal Pane (appears on the left side of the display; visibility is tied to the ISimpleToolRail component) (Note that there can be only one modal pane visible at a time) - Global Pane (appears on the right side of the display; visibility is up to the creator/user)

    ISimpleToolPaneOptions

    A set of options which define the basic properties of a window pane (or sub-pane) for a simple tool. This pane can be a top level pane, or a child pane of the top level pane, and is the content container for all of the UI controls used by the editor tool. Each pane is uniquely identified by the id property, and has a number of optional function closures which are called at various points in the pane's lifecycle. Note that instead of having a single onFinalize function, panes implement a pair of onBeginFinalize and onEndFinalize functions. This is to allow for the pane to be partially constructed BEFORE any child panes are constructed. Once all child panes have been fully finalized, then the onEndFinalize function is called to allow the pane to finalize itself.

    ISimpleToolRailComponent
    ISimpleToolRailOptions

    The tool rail component allows the tool to register an icon and button (and dynamic tooltip) in the tool rail on the left side of the display. Adding a tool rail component to a tool will cause the tool to be considered a modal tool, and only one single modal tool can be active at any one time. Modal tools are generally tools which take focus and control of the cursor (e.g. selection, clipboards, entity selection, etc) Global tools (tools which do not have a tool rail) are generally things like property pages, settings, etc - things that do not require an active cursor or gameplay interaction

    ISimpleToolStatusBarComponent
    ISimpleToolStatusBarOptions

    A set of options which define the basic properties of a status bar item for a simple tool.

    IStatusBar

    Manager and container for IStatusBarItem objects

    IStatusBarItem
    IStatusBarItemCreationParams

    Properties required to create a status bar item

    IStringPropertyItem

    A property item which supports String properties

    IStringPropertyItemOptions

    Optional properties for String property item

    ISubPanePropertyItem

    A property item which supports Sub Pane properties

    ISubPanePropertyItemOptions

    Optional properties for Sub Pane property item

    ITextPropertyItem

    A property item which supports Text properties

    ITextPropertyItemOptions

    Optional properties for Text property item

    IToggleGroupPropertyItem

    A property item which supports toggle button properties

    IToggleGroupPropertyItemEntry

    Properties of toggle group property item list entry

    IToggleGroupPropertyItemOptions

    Optional properties for Toggle Group property item

    IVector3PropertyItem

    A property item which supports Vector3 properties

    IVector3PropertyItemOptions

    Optional properties for Vector3 property item

    LogProperties

    A properties class for the global instance of the logger object. While the logger object is available through the ExtensionContext - using the global instance allows the creator to use this properties class to perform direct server->client messaging and broadcasts.

    ModalToolCreationParameters

    Parameters for creating a modal tool in the tool container

    ProjectExportOptions
    QuickExtrudeProperties
    WeightedBlock
    WidgetComponentBaseOptions
    WidgetComponentBoundingBoxOptions
    WidgetComponentClipboardOptions
    WidgetComponentEntityOptions
    WidgetComponentGizmoOptions
    WidgetComponentGuideOptions
    WidgetComponentRenderPrimitiveOptions
    WidgetComponentSplineOptions
    WidgetComponentTextOptions
    WidgetComponentVolumeOutlineOptions
    WidgetCreateOptions
    WidgetGroupCreateOptions

    Type Aliases

    Action

    Full set of all possible raw actions

    ActionID

    All actions have a unique identifier. Identifiers are globally unique and often GUIDs

    ActivationFunctionType

    Callback type when an extension instance is activated for a given player. It is expected to return an array of disposables that will automatically be cleaned up on shutdown.

    ButtonPropertyItemSupportedActionTypes

    All possible button item action types

    ContinuousAction

    An action that continues to execute after activation

    EventHandler

    A generic handler for an event sink.

    GraphicsSettingsPropertyTypeMap

    Defines type information for graphics settings properties.

    ImageAnimationData

    Animation properties for a horizontally laid out sprite sheet image

    ImageResourceData
    IObservableProp

    Type that can be an observable or a value.

    IPlayerUISession

    The IPlayerUISession represents the editor user interface for a given player and given extension. Extensions registered with Minecraft are instantiated for each player which joins a server, and this interface provides the set of functionality needed to create and modify the editor UI for that player. The associated Editor Context for this session object is also player specific. From a given IPlayerUISession object, there is no way to interact with the UI of another player, that must be done from global extension scope registration and/or data sharing independent of the UI object.

    KeyBinding

    Keyboard binding properties.

    KeyBindingInfo

    Additional information about key binding.

    LocalizedString

    Represents a localized string or an object with a localized string and optional properties

    ModalToolLifecycleEventPayload

    Modal tool lifecycle event payload

    MouseModifiers

    Input modifier states for mouse actions

    MouseProps

    Mouse properties that provide additional information from client event handling

    MouseRayCastAction

    An action which returns the ray corresponding to a vector from the users mouse click in the viewport.

    NoArgsAction

    An action which needs no additional client side arguments on execute

    PropertyBag
    PropertyPaneVisibilityUpdate

    Callback to execute when a visibility of a property pane is updated.

    Ray

    Ray representing a direction from a set location. This location typically corresponds to the location of a mouse click performed on the client.

    RegisteredAction

    A registered action is an action that has been registered with the action manager system and has a unique ID representing the action now. An action must be registered before it can be used in other systems.

    ShutdownFunctionType

    Callback type when an extension instance is shutdown for a given player. Used for performing any final work or clean up that can't be handled automatically via Disposables.

    SpeedSettingsPropertyTypeMap
    StatefulAction

    An action which returns the activation state.

    SupportedKeyboardActionTypes

    Full set of all possible keyboard actions

    SupportedMouseActionTypes

    Full set of all possible mouse actions

    TooltipInteractiveContent

    Content properties to display interactive tooltips

    TooltipInteractiveContentDescription

    Possible tooltip description items

    Tooltip link description

    UnregisterInputBindingCallback

    Variables

    editor

    Functions

    deserialize
    executeLargeOperation
    executeLargeOperationFromIterator
    getDefaultAllowBlockList
    getDefaultBrushShapes
    makeObservable
    registerEditorExtension
    registerSerializationForType
    registerUserDefinedTransactionHandler
    serialize
    stringFromException