mirror of
https://github.com/XeroAlpha/sapi-typedoc.git
synced 2024-11-22 17:48:50 +00:00
This commit is contained in:
parent
c8264c3975
commit
c337b7aeb4
@ -96,7 +96,19 @@ export class BrushShapeManager {
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
*/
|
||||
setSmoothStrength(smoothStrength: number): void;
|
||||
setFlattenHeight(flattenHeight: number): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
*/
|
||||
setFlattenRadius(flattenRadius: number): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
*/
|
||||
setTerrainStrength(terrainStrength: number): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
|
@ -2,4 +2,6 @@ export enum PaintMode {
|
||||
BlockPaint = 0,
|
||||
FreehandSelect = 1,
|
||||
Smooth = 2,
|
||||
Roughen = 3,
|
||||
Flatten = 4,
|
||||
}
|
38
translate-pieces/server-editor/index.d.ts
vendored
38
translate-pieces/server-editor/index.d.ts
vendored
@ -46,12 +46,11 @@ export { ThemeSettingsColorKey } from './enums/ThemeSettingsColorKey';
|
||||
export { WidgetComponentType } from './enums/WidgetComponentType';
|
||||
export { WidgetGroupSelectionMode } from './enums/WidgetGroupSelectionMode';
|
||||
export { WidgetMouseButtonActionType } from './enums/WidgetMouseButtonActionType';
|
||||
export { GraphicsSettingsPropertyTypeMap } from './types/GraphicsSettingsPropertyTypeMap';
|
||||
export { SpeedSettingsPropertyTypeMap } from './types/SpeedSettingsPropertyTypeMap';
|
||||
export { Action } from './types/Action';
|
||||
export { ActionID } from './types/ActionID';
|
||||
export { ActivationFunctionType } from './types/ActivationFunctionType';
|
||||
export { EventHandler } from './types/EventHandler';
|
||||
export { GraphicsSettingsPropertyTypeMap } from './types/GraphicsSettingsPropertyTypeMap';
|
||||
export { IBlockListPropertyItem } from './types/IBlockListPropertyItem';
|
||||
export { IDropdownPropertyItem_deprecated } from './types/IDropdownPropertyItem_deprecated';
|
||||
export { ImageResourceData } from './types/ImageResourceData';
|
||||
@ -73,6 +72,7 @@ export { PropertyPaneVisibilityUpdate } from './types/PropertyPaneVisibilityUpda
|
||||
export { Ray } from './types/Ray';
|
||||
export { RegisteredAction } from './types/RegisteredAction';
|
||||
export { ShutdownFunctionType } from './types/ShutdownFunctionType';
|
||||
export { SpeedSettingsPropertyTypeMap } from './types/SpeedSettingsPropertyTypeMap';
|
||||
export { SupportedKeyboardActionTypes } from './types/SupportedKeyboardActionTypes';
|
||||
export { SupportedMouseActionTypes } from './types/SupportedMouseActionTypes';
|
||||
export { TooltipInteractiveContent } from './types/TooltipInteractiveContent';
|
||||
@ -147,32 +147,18 @@ export { WidgetGroup } from './classes/WidgetGroup';
|
||||
export { WidgetManager } from './classes/WidgetManager';
|
||||
export { WidgetMouseButtonEventData } from './classes/WidgetMouseButtonEventData';
|
||||
export { WidgetStateChangeEventData } from './classes/WidgetStateChangeEventData';
|
||||
export { ActionManager } from './interfaces/ActionManager';
|
||||
export { BlockMaskList } from './interfaces/BlockMaskList';
|
||||
export { BrushShape } from './interfaces/BrushShape';
|
||||
export { BuiltInUIManager } from './interfaces/BuiltInUIManager';
|
||||
export { ClipboardWriteOptions } from './interfaces/ClipboardWriteOptions';
|
||||
export { CursorProperties } from './interfaces/CursorProperties';
|
||||
export { CursorRay } from './interfaces/CursorRay';
|
||||
export { EditorStructure } from './interfaces/EditorStructure';
|
||||
export { EditorStructureSearchOptions } from './interfaces/EditorStructureSearchOptions';
|
||||
export { EventSink } from './interfaces/EventSink';
|
||||
export { ExtensionOptionalParameters } from './interfaces/ExtensionOptionalParameters';
|
||||
export { GameOptions } from './interfaces/GameOptions';
|
||||
export { LogProperties } from './interfaces/LogProperties';
|
||||
export { ProjectExportOptions } from './interfaces/ProjectExportOptions';
|
||||
export { SettingsUIElementOptions } from './interfaces/SettingsUIElementOptions';
|
||||
export { WeightedBlock } from './interfaces/WeightedBlock';
|
||||
export { WidgetComponentBaseOptions } from './interfaces/WidgetComponentBaseOptions';
|
||||
export { WidgetComponentClipboardOptions } from './interfaces/WidgetComponentClipboardOptions';
|
||||
export { WidgetComponentEntityOptions } from './interfaces/WidgetComponentEntityOptions';
|
||||
export { WidgetComponentGizmoOptions } from './interfaces/WidgetComponentGizmoOptions';
|
||||
export { WidgetComponentGuideOptions } from './interfaces/WidgetComponentGuideOptions';
|
||||
export { WidgetComponentRenderPrimitiveOptions } from './interfaces/WidgetComponentRenderPrimitiveOptions';
|
||||
export { WidgetComponentSplineOptions } from './interfaces/WidgetComponentSplineOptions';
|
||||
export { WidgetComponentTextOptions } from './interfaces/WidgetComponentTextOptions';
|
||||
export { WidgetCreateOptions } from './interfaces/WidgetCreateOptions';
|
||||
export { WidgetGroupCreateOptions } from './interfaces/WidgetGroupCreateOptions';
|
||||
export { ActionManager } from './interfaces/ActionManager';
|
||||
export { BuiltInUIManager } from './interfaces/BuiltInUIManager';
|
||||
export { EventSink } from './interfaces/EventSink';
|
||||
export { IActionBar } from './interfaces/IActionBar';
|
||||
export { IActionBarItem } from './interfaces/IActionBarItem';
|
||||
export { IActionBarItemCreationParams } from './interfaces/IActionBarItemCreationParams';
|
||||
@ -245,7 +231,21 @@ export { IToggleGroupPropertyItemEntry } from './interfaces/IToggleGroupProperty
|
||||
export { IToggleGroupPropertyItemOptions } from './interfaces/IToggleGroupPropertyItemOptions';
|
||||
export { IVector3PropertyItem } from './interfaces/IVector3PropertyItem';
|
||||
export { IVector3PropertyItemOptions } from './interfaces/IVector3PropertyItemOptions';
|
||||
export { LogProperties } from './interfaces/LogProperties';
|
||||
export { ModalToolCreationParameters } from './interfaces/ModalToolCreationParameters';
|
||||
export { ProjectExportOptions } from './interfaces/ProjectExportOptions';
|
||||
export { SettingsUIElementOptions } from './interfaces/SettingsUIElementOptions';
|
||||
export { WeightedBlock } from './interfaces/WeightedBlock';
|
||||
export { WidgetComponentBaseOptions } from './interfaces/WidgetComponentBaseOptions';
|
||||
export { WidgetComponentClipboardOptions } from './interfaces/WidgetComponentClipboardOptions';
|
||||
export { WidgetComponentEntityOptions } from './interfaces/WidgetComponentEntityOptions';
|
||||
export { WidgetComponentGizmoOptions } from './interfaces/WidgetComponentGizmoOptions';
|
||||
export { WidgetComponentGuideOptions } from './interfaces/WidgetComponentGuideOptions';
|
||||
export { WidgetComponentRenderPrimitiveOptions } from './interfaces/WidgetComponentRenderPrimitiveOptions';
|
||||
export { WidgetComponentSplineOptions } from './interfaces/WidgetComponentSplineOptions';
|
||||
export { WidgetComponentTextOptions } from './interfaces/WidgetComponentTextOptions';
|
||||
export { WidgetCreateOptions } from './interfaces/WidgetCreateOptions';
|
||||
export { WidgetGroupCreateOptions } from './interfaces/WidgetGroupCreateOptions';
|
||||
export { InvalidWidgetComponentError } from './classes/InvalidWidgetComponentError';
|
||||
export { InvalidWidgetError } from './classes/InvalidWidgetError';
|
||||
export { InvalidWidgetGroupError } from './classes/InvalidWidgetGroupError';
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* IMPORT */ import { DaylightCycle, GamePublishSetting, PlayerPermissionLevel, ProjectExportType, minecraftserver } from '../index';
|
||||
|
||||
export interface GameOptions {
|
||||
bedsWork?: boolean;
|
||||
bonusChest?: boolean;
|
||||
cheats?: boolean;
|
||||
commandBlockEnabled?: boolean;
|
||||
@ -32,6 +33,7 @@ export interface GameOptions {
|
||||
showCoordinates?: boolean;
|
||||
showDaysPlayed?: boolean;
|
||||
simulationDistance?: number;
|
||||
sleepSkipPercent?: number;
|
||||
spawnPosition?: minecraftserver.Vector3;
|
||||
startingMap?: boolean;
|
||||
tileDrops?: boolean;
|
||||
|
@ -18,7 +18,7 @@ export enum PacketId {
|
||||
AvailableActorIdentifiersPacket = 'AvailableActorIdentifiersPacket',
|
||||
AvailableCommandsPacket = 'AvailableCommandsPacket',
|
||||
AwardAchievementPacket = 'AwardAchievementPacket',
|
||||
BiomeDefinitionList = 'BiomeDefinitionList',
|
||||
BiomeDefinitionListPacket = 'BiomeDefinitionListPacket',
|
||||
BlockActorDataPacket = 'BlockActorDataPacket',
|
||||
BlockEventPacket = 'BlockEventPacket',
|
||||
BlockPickRequestPacket = 'BlockPickRequestPacket',
|
||||
@ -35,9 +35,11 @@ export enum PacketId {
|
||||
ChunkRadiusUpdatedPacket = 'ChunkRadiusUpdatedPacket',
|
||||
ClientboundCloseFormPacket = 'ClientboundCloseFormPacket',
|
||||
ClientboundDebugRendererPacket = 'ClientboundDebugRendererPacket',
|
||||
ClientboundMapItemDataPacket = 'ClientboundMapItemDataPacket',
|
||||
ClientCacheBlobStatusPacket = 'ClientCacheBlobStatusPacket',
|
||||
ClientCacheMissResponsePacket = 'ClientCacheMissResponsePacket',
|
||||
ClientCacheStatusPacket = 'ClientCacheStatusPacket',
|
||||
ClientCameraAimAssistPacket = 'ClientCameraAimAssistPacket',
|
||||
ClientToServerHandshakePacket = 'ClientToServerHandshakePacket',
|
||||
CodeBuilderPacket = 'CodeBuilderPacket',
|
||||
CodeBuilderSourcePacket = 'CodeBuilderSourcePacket',
|
||||
@ -91,7 +93,6 @@ export enum PacketId {
|
||||
LoginPacket = 'LoginPacket',
|
||||
MapCreateLockedCopyPacket = 'MapCreateLockedCopyPacket',
|
||||
MapInfoRequestPacket = 'MapInfoRequestPacket',
|
||||
MapItemDataPacket = 'MapItemDataPacket',
|
||||
MobArmorEquipmentPacket = 'MobArmorEquipmentPacket',
|
||||
MobEffectPacket = 'MobEffectPacket',
|
||||
MobEquipmentPacket = 'MobEquipmentPacket',
|
||||
|
@ -12,9 +12,9 @@ export class ItemCompostableComponent extends ItemComponent {
|
||||
* @remarks
|
||||
* This is the percent chance of the item composting in the
|
||||
* composter block and generating a compost layer. Note this
|
||||
* api will not return the percent chance for some vanilla
|
||||
* items. To get the compostable chance for all items, use the
|
||||
* compostingChance property on the ItemStack.
|
||||
* api will also return the composting chance for vanilla items
|
||||
* that are compostable but do not use the compostable item
|
||||
* component.
|
||||
*
|
||||
* @throws
|
||||
* Throws if value outside the range [1 - 100]
|
||||
|
12
translate-pieces/server/classes/ItemStack.d.ts
vendored
12
translate-pieces/server/classes/ItemStack.d.ts
vendored
@ -19,18 +19,6 @@ export class ItemStack {
|
||||
* Throws if the value is outside the range of 1-255.
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* @beta
|
||||
* @remarks
|
||||
* This is the percent chance of the item composting in the
|
||||
* composter block and generating a compost layer.
|
||||
*
|
||||
* @throws
|
||||
* Throws if value outside the range [1 - 100]
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
readonly compostingChance: number;
|
||||
/**
|
||||
* @remarks
|
||||
* Returns whether the item is stackable. An item is considered
|
||||
|
@ -20,7 +20,7 @@ export class PlayerInputPermissions {
|
||||
*/
|
||||
movementEnabled: boolean;
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Returns true if an input permission is enabled.
|
||||
*
|
||||
@ -32,7 +32,7 @@ export class PlayerInputPermissions {
|
||||
*/
|
||||
isPermissionCategoryEnabled(permissionCategory: InputPermissionCategory): boolean;
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Enable or disable an input permission. When enabled the
|
||||
* input will work, when disabled will not work.
|
||||
|
24
translate-pieces/server/classes/ShutdownBeforeEventSignal.d.ts
vendored
Normal file
24
translate-pieces/server/classes/ShutdownBeforeEventSignal.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/* IMPORT */ import { ShutdownEvent } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
*/
|
||||
export class ShutdownBeforeEventSignal {
|
||||
private constructor();
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* This function can be called in early-execution mode.
|
||||
*
|
||||
*/
|
||||
subscribe(callback: (arg: ShutdownEvent) => void): (arg: ShutdownEvent) => void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* This function can be called in early-execution mode.
|
||||
*
|
||||
*/
|
||||
unsubscribe(callback: (arg: ShutdownEvent) => void): void;
|
||||
}
|
6
translate-pieces/server/classes/ShutdownEvent.d.ts
vendored
Normal file
6
translate-pieces/server/classes/ShutdownEvent.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* @beta
|
||||
*/
|
||||
export class ShutdownEvent {
|
||||
private constructor();
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { Dimension, InvalidStructureError, JigsawPlaceOptions, JigsawStructurePlaceOptions, PlaceJigsawError, Structure, StructureCreateOptions, StructurePlaceOptions, StructureSaveMode, Vector3, minecraftcommon } from '../index';
|
||||
/* IMPORT */ import { BoundingBox, Dimension, InvalidStructureError, JigsawPlaceOptions, JigsawStructurePlaceOptions, PlaceJigsawError, Structure, StructureCreateOptions, StructurePlaceOptions, StructureSaveMode, Vector3, minecraftcommon } from '../index';
|
||||
|
||||
/**
|
||||
* Manager for Structure related APIs. Includes APIs for
|
||||
@ -163,6 +163,9 @@ export class StructureManager {
|
||||
* @param options
|
||||
* Optional settings to use when generating the jigsaw
|
||||
* structure.
|
||||
* @returns
|
||||
* Returns a {@link BoundingBox} object which represents the
|
||||
* maximum bounds of the jigsaw structure.
|
||||
* @throws
|
||||
* Throws if maxDepth is outside of the range [1,20]
|
||||
* Throws if generation fails due to invalid parameters or
|
||||
@ -179,7 +182,7 @@ export class StructureManager {
|
||||
dimension: Dimension,
|
||||
location: Vector3,
|
||||
options?: JigsawPlaceOptions,
|
||||
): void;
|
||||
): BoundingBox;
|
||||
/**
|
||||
* @beta
|
||||
* @remarks
|
||||
@ -200,6 +203,9 @@ export class StructureManager {
|
||||
* @param options
|
||||
* Optional settings to use when generating the jigsaw
|
||||
* structure.
|
||||
* @returns
|
||||
* Returns a {@link BoundingBox} object which represents the
|
||||
* maximum bounds of the jigsaw structure.
|
||||
* @throws
|
||||
* Throws if generation fails due to invalid parameters or
|
||||
* jigsaw configuration.
|
||||
@ -213,5 +219,5 @@ export class StructureManager {
|
||||
dimension: Dimension,
|
||||
location: Vector3,
|
||||
options?: JigsawStructurePlaceOptions,
|
||||
): void;
|
||||
): BoundingBox;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { WatchdogTerminateBeforeEventSignal } from '../index';
|
||||
/* IMPORT */ import { ShutdownBeforeEventSignal, WatchdogTerminateBeforeEventSignal } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
@ -10,6 +10,7 @@
|
||||
*/
|
||||
export class SystemBeforeEvents {
|
||||
private constructor();
|
||||
readonly shutdown: ShutdownBeforeEventSignal;
|
||||
/**
|
||||
* @remarks
|
||||
* Fires when the scripting watchdog shuts down the server. The
|
||||
|
@ -20,7 +20,7 @@ export enum InputPermissionCategory {
|
||||
*/
|
||||
Movement = 2,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input for moving laterally in the world. This would
|
||||
* be WASD on a keyboard or the movement joystick on gamepad or
|
||||
@ -29,7 +29,7 @@ export enum InputPermissionCategory {
|
||||
*/
|
||||
LateralMovement = 4,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to sneak. This also affects flying
|
||||
* down.
|
||||
@ -37,7 +37,7 @@ export enum InputPermissionCategory {
|
||||
*/
|
||||
Sneak = 5,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to jumping. This also affects flying
|
||||
* up.
|
||||
@ -45,14 +45,14 @@ export enum InputPermissionCategory {
|
||||
*/
|
||||
Jump = 6,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to mounting vehicles.
|
||||
*
|
||||
*/
|
||||
Mount = 7,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to dismounting. When disabled, the
|
||||
* player can still dismount vehicles by other means, for
|
||||
@ -62,28 +62,28 @@ export enum InputPermissionCategory {
|
||||
*/
|
||||
Dismount = 8,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to moving the player forward.
|
||||
*
|
||||
*/
|
||||
MoveForward = 9,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to moving the player backward.
|
||||
*
|
||||
*/
|
||||
MoveBackward = 10,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to moving the player left.
|
||||
*
|
||||
*/
|
||||
MoveLeft = 11,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to moving the player right.
|
||||
*
|
||||
|
4
translate-pieces/server/index.d.ts
vendored
4
translate-pieces/server/index.d.ts
vendored
@ -45,9 +45,9 @@ export { TimeOfDay } from './enums/TimeOfDay';
|
||||
export { WatchdogTerminateReason } from './enums/WatchdogTerminateReason';
|
||||
export { WeatherType } from './enums/WeatherType';
|
||||
export { BlockComponentTypeMap } from './types/BlockComponentTypeMap';
|
||||
export { BlockStateArg } from './types/BlockStateArg';
|
||||
export { EntityComponentTypeMap } from './types/EntityComponentTypeMap';
|
||||
export { ItemComponentTypeMap } from './types/ItemComponentTypeMap';
|
||||
export { BlockStateArg } from './types/BlockStateArg';
|
||||
export { BiomeType } from './classes/BiomeType';
|
||||
export { BiomeTypes } from './classes/BiomeTypes';
|
||||
export { Block } from './classes/Block';
|
||||
@ -328,6 +328,8 @@ export { ScriptEventCommandMessageAfterEvent } from './classes/ScriptEventComman
|
||||
export { ScriptEventCommandMessageAfterEventSignal } from './classes/ScriptEventCommandMessageAfterEventSignal';
|
||||
export { Seat } from './classes/Seat';
|
||||
export { ServerMessageAfterEventSignal } from './classes/ServerMessageAfterEventSignal';
|
||||
export { ShutdownBeforeEventSignal } from './classes/ShutdownBeforeEventSignal';
|
||||
export { ShutdownEvent } from './classes/ShutdownEvent';
|
||||
export { Structure } from './classes/Structure';
|
||||
export { StructureManager } from './classes/StructureManager';
|
||||
export { System } from './classes/System';
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
/**
|
||||
* @beta
|
||||
*
|
||||
* Required Experiments:
|
||||
* - Third Person Cameras
|
||||
*
|
||||
*/
|
||||
export interface CameraFixedBoomOptions {
|
||||
entityOffset?: Vector3;
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
/**
|
||||
* @beta
|
||||
*
|
||||
* Required Experiments:
|
||||
* - Focus Target Camera
|
||||
*
|
||||
*/
|
||||
export interface CameraTargetOptions {
|
||||
offsetFromTargetCenter?: Vector3;
|
||||
|
2
translate-pieces/server/package.d.ts
vendored
2
translate-pieces/server/package.d.ts
vendored
@ -8,7 +8,7 @@
|
||||
* ```json
|
||||
* {
|
||||
* "module_name": "@minecraft/server",
|
||||
* "version": "1.17.0-beta"
|
||||
* "version": "1.18.0-beta"
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
|
@ -11,15 +11,15 @@ NPM 包:
|
||||
|[@minecraft/common](https://www.npmjs.com/package/@minecraft/common)|`1.2.0`|
|
||||
|[@minecraft/debug-utilities](https://www.npmjs.com/package/@minecraft/debug-utilities)|`1.0.0-beta`|
|
||||
|[@minecraft/math](https://www.npmjs.com/package/@minecraft/math)|`1.4.0`|
|
||||
|[@minecraft/server](https://www.npmjs.com/package/@minecraft/server)|`1.17.0-beta`|
|
||||
|[@minecraft/server](https://www.npmjs.com/package/@minecraft/server)|`1.18.0-beta`|
|
||||
|[@minecraft/server-admin](https://www.npmjs.com/package/@minecraft/server-admin)|`1.0.0-beta`|
|
||||
|[@minecraft/server-editor](https://www.npmjs.com/package/@minecraft/server-editor)|`0.1.0-beta`|
|
||||
|[@minecraft/server-gametest](https://www.npmjs.com/package/@minecraft/server-gametest)|`1.0.0-beta`|
|
||||
|[@minecraft/server-net](https://www.npmjs.com/package/@minecraft/server-net)|`1.0.0-beta`|
|
||||
|[@minecraft/server-ui](https://www.npmjs.com/package/@minecraft/server-ui)|`1.4.0-beta`|
|
||||
|[@minecraft/vanilla-data](https://www.npmjs.com/package/@minecraft/vanilla-data)|`1.21.50-preview.29`|
|
||||
|[@minecraft/vanilla-data](https://www.npmjs.com/package/@minecraft/vanilla-data)|`1.21.60-preview.21`|
|
||||
|
||||
游戏版本号:`1.21.50.29`
|
||||
游戏版本号:`1.21.60.21`
|
||||
|
||||
<!-- summary end -->
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"@minecraft/common": "1.2.0",
|
||||
"@minecraft/debug-utilities": "1.0.0-beta.1.21.50-preview.29",
|
||||
"@minecraft/debug-utilities": "1.0.0-beta.1.21.60-preview.21",
|
||||
"@minecraft/math": "1.4.0",
|
||||
"@minecraft/server": "1.17.0-beta.1.21.50-preview.29",
|
||||
"@minecraft/server-admin": "1.0.0-beta.1.21.50-preview.29",
|
||||
"@minecraft/server-editor": "0.1.0-beta.1.21.50-preview.29",
|
||||
"@minecraft/server-gametest": "1.0.0-beta.1.21.50-preview.29",
|
||||
"@minecraft/server-net": "1.0.0-beta.1.21.50-preview.29",
|
||||
"@minecraft/server-ui": "1.4.0-beta.1.21.50-preview.29",
|
||||
"@minecraft/vanilla-data": "1.21.50-preview.29"
|
||||
"@minecraft/server": "1.18.0-beta.1.21.60-preview.21",
|
||||
"@minecraft/server-admin": "1.0.0-beta.1.21.60-preview.21",
|
||||
"@minecraft/server-editor": "0.1.0-beta.1.21.60-preview.21",
|
||||
"@minecraft/server-gametest": "1.0.0-beta.1.21.60-preview.21",
|
||||
"@minecraft/server-net": "1.0.0-beta.1.21.60-preview.21",
|
||||
"@minecraft/server-ui": "1.4.0-beta.1.21.60-preview.21",
|
||||
"@minecraft/vanilla-data": "1.21.60-preview.21"
|
||||
},
|
||||
"overrides": {
|
||||
"@minecraft/debug-utilities": {
|
||||
|
422
translated/server-editor.d.ts
vendored
422
translated/server-editor.d.ts
vendored
@ -907,6 +907,8 @@ export enum PaintMode {
|
||||
BlockPaint = 0,
|
||||
FreehandSelect = 1,
|
||||
Smooth = 2,
|
||||
Roughen = 3,
|
||||
Flatten = 4,
|
||||
}
|
||||
|
||||
export enum Plane {
|
||||
@ -1086,19 +1088,6 @@ export enum WidgetMouseButtonActionType {
|
||||
Drag = 2,
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines type information for graphics settings properties.
|
||||
*/
|
||||
export type GraphicsSettingsPropertyTypeMap = {
|
||||
[GraphicsSettingsProperty.ShowInvisibleBlocks]?: boolean;
|
||||
[GraphicsSettingsProperty.ShowChunkBoundaries]?: boolean;
|
||||
[GraphicsSettingsProperty.ShowCompass]?: boolean;
|
||||
};
|
||||
|
||||
export type SpeedSettingsPropertyTypeMap = {
|
||||
[SpeedSettingsProperty.FlySpeedMultiplier]?: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Full set of all possible raw actions
|
||||
*/
|
||||
@ -1127,6 +1116,15 @@ export type ActivationFunctionType<PerPlayerStorageType> = (
|
||||
*/
|
||||
export declare type EventHandler<T> = (eventArg: T) => void;
|
||||
|
||||
/**
|
||||
* Defines type information for graphics settings properties.
|
||||
*/
|
||||
export type GraphicsSettingsPropertyTypeMap = {
|
||||
[GraphicsSettingsProperty.ShowInvisibleBlocks]?: boolean;
|
||||
[GraphicsSettingsProperty.ShowChunkBoundaries]?: boolean;
|
||||
[GraphicsSettingsProperty.ShowCompass]?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* A property item which supports BlockList properties
|
||||
*/
|
||||
@ -1328,6 +1326,10 @@ export type RegisteredAction<T extends Action> = T & ActionID;
|
||||
*/
|
||||
export type ShutdownFunctionType<PerPlayerStorageType> = (uiSession: IPlayerUISession<PerPlayerStorageType>) => void;
|
||||
|
||||
export type SpeedSettingsPropertyTypeMap = {
|
||||
[SpeedSettingsProperty.FlySpeedMultiplier]?: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Full set of all possible keyboard actions
|
||||
*/
|
||||
@ -1617,7 +1619,19 @@ export class BrushShapeManager {
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
*/
|
||||
setSmoothStrength(smoothStrength: number): void;
|
||||
setFlattenHeight(flattenHeight: number): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
*/
|
||||
setFlattenRadius(flattenRadius: number): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
*/
|
||||
setTerrainStrength(terrainStrength: number): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
@ -3978,6 +3992,23 @@ export class WidgetStateChangeEventData {
|
||||
readonly widget: Widget;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
export interface ActionManager {
|
||||
/**
|
||||
* @remarks
|
||||
* Creates an action and registers it on the client
|
||||
*
|
||||
* @param rawAction
|
||||
* The raw action to create. See ActionTypes for supported
|
||||
* parameters
|
||||
*/
|
||||
createAction<T extends Action>(rawAction: T): RegisteredAction<T>;
|
||||
}
|
||||
|
||||
export interface BlockMaskList {
|
||||
blockList: (minecraftserver.BlockPermutation | minecraftserver.BlockType | string)[];
|
||||
maskType: BlockMaskListType;
|
||||
@ -3988,6 +4019,48 @@ export interface BrushShape {
|
||||
name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a UI session for a given player
|
||||
*/
|
||||
export interface BuiltInUIManager {
|
||||
/**
|
||||
* @remarks
|
||||
* Navigates to the documentation site.
|
||||
*
|
||||
*/
|
||||
navigateToDocumentation(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* Navigates to the feedback site
|
||||
*
|
||||
*/
|
||||
navigateToFeedback(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* Navigates to the pause screen
|
||||
*
|
||||
*/
|
||||
navigateToPauseScreen(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* Updates the visibility of the log panel
|
||||
*
|
||||
*/
|
||||
updateLogPanelVisibility(visibility: boolean): void;
|
||||
/**
|
||||
* @remarks
|
||||
* Updates the visibility of the control demo
|
||||
*
|
||||
*/
|
||||
updateUISettingsPanelVisibility(visibility: boolean): void;
|
||||
/**
|
||||
* @remarks
|
||||
* Updates the visibility of the welcome panel
|
||||
*
|
||||
*/
|
||||
updateWelcomePanelVisibility(visibility: boolean): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface used to specify the options when a clipboard item
|
||||
* is being written to the world
|
||||
@ -4109,6 +4182,24 @@ export interface EditorStructureSearchOptions {
|
||||
includeTags?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* An event that can be subscribed to. You can use the token,
|
||||
* returned from the subscribe method, to clean up handlers.
|
||||
*/
|
||||
export declare interface EventSink<T> {
|
||||
/**
|
||||
* @remarks
|
||||
* Subscribes an event handler to a particular subscription.
|
||||
*
|
||||
* @param handler
|
||||
* Handler function to subscribe with.
|
||||
* @returns
|
||||
* An event handler subscription token that can be used to
|
||||
* unsubscribe and clean-up handlers.
|
||||
*/
|
||||
subscribe(handler: EventHandler<T>): IEventToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* An interface which defines the set of optional parameters
|
||||
* which can be used when calling the `registerEditorExtension`
|
||||
@ -4151,6 +4242,7 @@ export interface ExtensionOptionalParameters {
|
||||
}
|
||||
|
||||
export interface GameOptions {
|
||||
bedsWork?: boolean;
|
||||
bonusChest?: boolean;
|
||||
cheats?: boolean;
|
||||
commandBlockEnabled?: boolean;
|
||||
@ -4182,6 +4274,7 @@ export interface GameOptions {
|
||||
showCoordinates?: boolean;
|
||||
showDaysPlayed?: boolean;
|
||||
simulationDistance?: number;
|
||||
sleepSkipPercent?: number;
|
||||
spawnPosition?: minecraftserver.Vector3;
|
||||
startingMap?: boolean;
|
||||
tileDrops?: boolean;
|
||||
@ -4191,195 +4284,6 @@ export interface GameOptions {
|
||||
worldName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* A properties class for the global instance of the logger
|
||||
* object.
|
||||
* While the logger object is available through the {@link
|
||||
* ExtensionContext} - using the global instance allows the
|
||||
* creator to use this properties class to perform direct
|
||||
* server->client messaging and broadcasts.
|
||||
*/
|
||||
export interface LogProperties {
|
||||
/**
|
||||
* @remarks
|
||||
* Direct a log message to a specific player. If no player is
|
||||
* specified, then all players will receive the message
|
||||
*
|
||||
*/
|
||||
player?: minecraftserver.Player;
|
||||
/**
|
||||
* @remarks
|
||||
* Add additional tags to the log message which can be used by
|
||||
* the client session to filter/search in the log window
|
||||
*
|
||||
*/
|
||||
tags?: string[];
|
||||
}
|
||||
|
||||
export interface ProjectExportOptions {
|
||||
alwaysDay?: boolean;
|
||||
difficulty?: minecraftserver.Difficulty;
|
||||
disableWeather?: boolean;
|
||||
exportName?: string;
|
||||
exportType: ProjectExportType;
|
||||
gameMode?: minecraftserver.GameMode;
|
||||
initialTimOfDay?: number;
|
||||
}
|
||||
|
||||
export interface SettingsUIElementOptions {
|
||||
dropdownItems?: string[];
|
||||
max?: number;
|
||||
min?: number;
|
||||
refreshOnChange?: boolean;
|
||||
}
|
||||
|
||||
export interface WeightedBlock {
|
||||
block: minecraftserver.BlockType;
|
||||
weight: number;
|
||||
}
|
||||
|
||||
export interface WidgetComponentBaseOptions {
|
||||
lockToSurface?: boolean;
|
||||
offset?: minecraftserver.Vector3;
|
||||
stateChangeEvent?: (arg: WidgetComponentStateChangeEventData) => void;
|
||||
visible?: boolean;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentClipboardOptions extends WidgetComponentBaseOptions {
|
||||
boundsFillColor?: minecraftserver.RGBA;
|
||||
boundsOutlineColor?: minecraftserver.RGBA;
|
||||
clipboardMirror?: minecraftserver.StructureMirrorAxis;
|
||||
clipboardNormalizedOrigin?: minecraftserver.Vector3;
|
||||
clipboardOffset?: minecraftserver.Vector3;
|
||||
clipboardRotation?: minecraftserver.StructureRotation;
|
||||
showBounds?: boolean;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentEntityOptions extends WidgetComponentBaseOptions {
|
||||
deselectedAnimation?: string;
|
||||
isClickable?: boolean;
|
||||
selectedAnimation?: string;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentGizmoOptions extends WidgetComponentBaseOptions {
|
||||
axes?: Axis;
|
||||
enablePlanes?: boolean;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentGuideOptions extends WidgetComponentBaseOptions {}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentRenderPrimitiveOptions extends WidgetComponentBaseOptions {}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentSplineOptions extends WidgetComponentBaseOptions {
|
||||
controlPoints: Widget[];
|
||||
splineType?: SplineType;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentTextOptions extends WidgetComponentBaseOptions {
|
||||
color?: minecraftserver.RGBA;
|
||||
}
|
||||
|
||||
export interface WidgetCreateOptions {
|
||||
bindPositionToBlockCursor?: boolean;
|
||||
collisionOffset?: minecraftserver.Vector3;
|
||||
collisionRadius?: number;
|
||||
lockToSurface?: boolean;
|
||||
selectable?: boolean;
|
||||
snapToBlockLocation?: boolean;
|
||||
stateChangeEvent?: (arg: WidgetStateChangeEventData) => void;
|
||||
visible?: boolean;
|
||||
}
|
||||
|
||||
export interface WidgetGroupCreateOptions {
|
||||
groupSelectionMode?: WidgetGroupSelectionMode;
|
||||
showBounds?: boolean;
|
||||
visible?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
export interface ActionManager {
|
||||
/**
|
||||
* @remarks
|
||||
* Creates an action and registers it on the client
|
||||
*
|
||||
* @param rawAction
|
||||
* The raw action to create. See ActionTypes for supported
|
||||
* parameters
|
||||
*/
|
||||
createAction<T extends Action>(rawAction: T): RegisteredAction<T>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a UI session for a given player
|
||||
*/
|
||||
export interface BuiltInUIManager {
|
||||
/**
|
||||
* @remarks
|
||||
* Navigates to the documentation site.
|
||||
*
|
||||
*/
|
||||
navigateToDocumentation(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* Navigates to the feedback site
|
||||
*
|
||||
*/
|
||||
navigateToFeedback(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* Navigates to the pause screen
|
||||
*
|
||||
*/
|
||||
navigateToPauseScreen(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* Updates the visibility of the log panel
|
||||
*
|
||||
*/
|
||||
updateLogPanelVisibility(visibility: boolean): void;
|
||||
/**
|
||||
* @remarks
|
||||
* Updates the visibility of the control demo
|
||||
*
|
||||
*/
|
||||
updateUISettingsPanelVisibility(visibility: boolean): void;
|
||||
/**
|
||||
* @remarks
|
||||
* Updates the visibility of the welcome panel
|
||||
*
|
||||
*/
|
||||
updateWelcomePanelVisibility(visibility: boolean): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* An event that can be subscribed to. You can use the token,
|
||||
* returned from the subscribe method, to clean up handlers.
|
||||
*/
|
||||
export declare interface EventSink<T> {
|
||||
/**
|
||||
* @remarks
|
||||
* Subscribes an event handler to a particular subscription.
|
||||
*
|
||||
* @param handler
|
||||
* Handler function to subscribe with.
|
||||
* @returns
|
||||
* An event handler subscription token that can be used to
|
||||
* unsubscribe and clean-up handlers.
|
||||
*/
|
||||
subscribe(handler: EventHandler<T>): IEventToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Manager for IActionBarItem objects.
|
||||
*/
|
||||
@ -6876,6 +6780,31 @@ export interface IVector3PropertyItemOptions extends IPropertyItemOptionsBase {
|
||||
tooltip?: LocalizedString;
|
||||
}
|
||||
|
||||
/**
|
||||
* A properties class for the global instance of the logger
|
||||
* object.
|
||||
* While the logger object is available through the {@link
|
||||
* ExtensionContext} - using the global instance allows the
|
||||
* creator to use this properties class to perform direct
|
||||
* server->client messaging and broadcasts.
|
||||
*/
|
||||
export interface LogProperties {
|
||||
/**
|
||||
* @remarks
|
||||
* Direct a log message to a specific player. If no player is
|
||||
* specified, then all players will receive the message
|
||||
*
|
||||
*/
|
||||
player?: minecraftserver.Player;
|
||||
/**
|
||||
* @remarks
|
||||
* Add additional tags to the log message which can be used by
|
||||
* the client session to filter/search in the log window
|
||||
*
|
||||
*/
|
||||
tags?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for creating a modal tool in the tool container
|
||||
*/
|
||||
@ -6906,6 +6835,93 @@ export interface ModalToolCreationParameters {
|
||||
tooltip?: string;
|
||||
}
|
||||
|
||||
export interface ProjectExportOptions {
|
||||
alwaysDay?: boolean;
|
||||
difficulty?: minecraftserver.Difficulty;
|
||||
disableWeather?: boolean;
|
||||
exportName?: string;
|
||||
exportType: ProjectExportType;
|
||||
gameMode?: minecraftserver.GameMode;
|
||||
initialTimOfDay?: number;
|
||||
}
|
||||
|
||||
export interface SettingsUIElementOptions {
|
||||
dropdownItems?: string[];
|
||||
max?: number;
|
||||
min?: number;
|
||||
refreshOnChange?: boolean;
|
||||
}
|
||||
|
||||
export interface WeightedBlock {
|
||||
block: minecraftserver.BlockType;
|
||||
weight: number;
|
||||
}
|
||||
|
||||
export interface WidgetComponentBaseOptions {
|
||||
lockToSurface?: boolean;
|
||||
offset?: minecraftserver.Vector3;
|
||||
stateChangeEvent?: (arg: WidgetComponentStateChangeEventData) => void;
|
||||
visible?: boolean;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentClipboardOptions extends WidgetComponentBaseOptions {
|
||||
boundsFillColor?: minecraftserver.RGBA;
|
||||
boundsOutlineColor?: minecraftserver.RGBA;
|
||||
clipboardMirror?: minecraftserver.StructureMirrorAxis;
|
||||
clipboardNormalizedOrigin?: minecraftserver.Vector3;
|
||||
clipboardOffset?: minecraftserver.Vector3;
|
||||
clipboardRotation?: minecraftserver.StructureRotation;
|
||||
showBounds?: boolean;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentEntityOptions extends WidgetComponentBaseOptions {
|
||||
deselectedAnimation?: string;
|
||||
isClickable?: boolean;
|
||||
selectedAnimation?: string;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentGizmoOptions extends WidgetComponentBaseOptions {
|
||||
axes?: Axis;
|
||||
enablePlanes?: boolean;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentGuideOptions extends WidgetComponentBaseOptions {}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentRenderPrimitiveOptions extends WidgetComponentBaseOptions {}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentSplineOptions extends WidgetComponentBaseOptions {
|
||||
controlPoints: Widget[];
|
||||
splineType?: SplineType;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentTextOptions extends WidgetComponentBaseOptions {
|
||||
color?: minecraftserver.RGBA;
|
||||
}
|
||||
|
||||
export interface WidgetCreateOptions {
|
||||
bindPositionToBlockCursor?: boolean;
|
||||
collisionOffset?: minecraftserver.Vector3;
|
||||
collisionRadius?: number;
|
||||
lockToSurface?: boolean;
|
||||
selectable?: boolean;
|
||||
snapToBlockLocation?: boolean;
|
||||
stateChangeEvent?: (arg: WidgetStateChangeEventData) => void;
|
||||
visible?: boolean;
|
||||
}
|
||||
|
||||
export interface WidgetGroupCreateOptions {
|
||||
groupSelectionMode?: WidgetGroupSelectionMode;
|
||||
showBounds?: boolean;
|
||||
visible?: boolean;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export class InvalidWidgetComponentError extends Error {
|
||||
private constructor();
|
||||
|
5
translated/server-net.d.ts
vendored
5
translated/server-net.d.ts
vendored
@ -90,7 +90,7 @@ export enum PacketId {
|
||||
AvailableActorIdentifiersPacket = 'AvailableActorIdentifiersPacket',
|
||||
AvailableCommandsPacket = 'AvailableCommandsPacket',
|
||||
AwardAchievementPacket = 'AwardAchievementPacket',
|
||||
BiomeDefinitionList = 'BiomeDefinitionList',
|
||||
BiomeDefinitionListPacket = 'BiomeDefinitionListPacket',
|
||||
BlockActorDataPacket = 'BlockActorDataPacket',
|
||||
BlockEventPacket = 'BlockEventPacket',
|
||||
BlockPickRequestPacket = 'BlockPickRequestPacket',
|
||||
@ -107,9 +107,11 @@ export enum PacketId {
|
||||
ChunkRadiusUpdatedPacket = 'ChunkRadiusUpdatedPacket',
|
||||
ClientboundCloseFormPacket = 'ClientboundCloseFormPacket',
|
||||
ClientboundDebugRendererPacket = 'ClientboundDebugRendererPacket',
|
||||
ClientboundMapItemDataPacket = 'ClientboundMapItemDataPacket',
|
||||
ClientCacheBlobStatusPacket = 'ClientCacheBlobStatusPacket',
|
||||
ClientCacheMissResponsePacket = 'ClientCacheMissResponsePacket',
|
||||
ClientCacheStatusPacket = 'ClientCacheStatusPacket',
|
||||
ClientCameraAimAssistPacket = 'ClientCameraAimAssistPacket',
|
||||
ClientToServerHandshakePacket = 'ClientToServerHandshakePacket',
|
||||
CodeBuilderPacket = 'CodeBuilderPacket',
|
||||
CodeBuilderSourcePacket = 'CodeBuilderSourcePacket',
|
||||
@ -163,7 +165,6 @@ export enum PacketId {
|
||||
LoginPacket = 'LoginPacket',
|
||||
MapCreateLockedCopyPacket = 'MapCreateLockedCopyPacket',
|
||||
MapInfoRequestPacket = 'MapInfoRequestPacket',
|
||||
MapItemDataPacket = 'MapItemDataPacket',
|
||||
MobArmorEquipmentPacket = 'MobArmorEquipmentPacket',
|
||||
MobEffectPacket = 'MobEffectPacket',
|
||||
MobEquipmentPacket = 'MobEquipmentPacket',
|
||||
|
117
translated/server.d.ts
vendored
117
translated/server.d.ts
vendored
@ -16,7 +16,7 @@
|
||||
* ```json
|
||||
* {
|
||||
* "module_name": "@minecraft/server",
|
||||
* "version": "1.17.0-beta"
|
||||
* "version": "1.18.0-beta"
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
@ -1683,7 +1683,7 @@ export enum InputPermissionCategory {
|
||||
*/
|
||||
Movement = 2,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input for moving laterally in the world. This would
|
||||
* be WASD on a keyboard or the movement joystick on gamepad or
|
||||
@ -1692,7 +1692,7 @@ export enum InputPermissionCategory {
|
||||
*/
|
||||
LateralMovement = 4,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to sneak. This also affects flying
|
||||
* down.
|
||||
@ -1700,7 +1700,7 @@ export enum InputPermissionCategory {
|
||||
*/
|
||||
Sneak = 5,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to jumping. This also affects flying
|
||||
* up.
|
||||
@ -1708,14 +1708,14 @@ export enum InputPermissionCategory {
|
||||
*/
|
||||
Jump = 6,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to mounting vehicles.
|
||||
*
|
||||
*/
|
||||
Mount = 7,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to dismounting. When disabled, the
|
||||
* player can still dismount vehicles by other means, for
|
||||
@ -1725,28 +1725,28 @@ export enum InputPermissionCategory {
|
||||
*/
|
||||
Dismount = 8,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to moving the player forward.
|
||||
*
|
||||
*/
|
||||
MoveForward = 9,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to moving the player backward.
|
||||
*
|
||||
*/
|
||||
MoveBackward = 10,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to moving the player left.
|
||||
*
|
||||
*/
|
||||
MoveLeft = 11,
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Player input relating to moving the player right.
|
||||
*
|
||||
@ -2372,6 +2372,19 @@ export type BlockComponentTypeMap = {
|
||||
sign: BlockSignComponent;
|
||||
};
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* Type alias used by the {@link BlockPermutation} matches and
|
||||
* resolve functions to narrow block state argument types to
|
||||
* those mapped by {@link
|
||||
* @minecraft/vanilla-data.BlockStateMapping}.
|
||||
*/
|
||||
export type BlockStateArg<T> = T extends `${minecraftvanilladata.MinecraftBlockTypes}`
|
||||
? T extends keyof minecraftvanilladata.BlockStateMapping
|
||||
? minecraftvanilladata.BlockStateMapping[T]
|
||||
: never
|
||||
: Record<string, boolean | number | string>;
|
||||
|
||||
/**
|
||||
* @beta
|
||||
*/
|
||||
@ -2530,19 +2543,6 @@ export type ItemComponentTypeMap = {
|
||||
potion: ItemPotionComponent;
|
||||
};
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* Type alias used by the {@link BlockPermutation} matches and
|
||||
* resolve functions to narrow block state argument types to
|
||||
* those mapped by {@link
|
||||
* @minecraft/vanilla-data.BlockStateMapping}.
|
||||
*/
|
||||
export type BlockStateArg<T> = T extends `${minecraftvanilladata.MinecraftBlockTypes}`
|
||||
? T extends keyof minecraftvanilladata.BlockStateMapping
|
||||
? minecraftvanilladata.BlockStateMapping[T]
|
||||
: never
|
||||
: Record<string, boolean | number | string>;
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* Describes a type of biome.
|
||||
@ -10139,9 +10139,9 @@ export class ItemCompostableComponent extends ItemComponent {
|
||||
* @remarks
|
||||
* This is the percent chance of the item composting in the
|
||||
* composter block and generating a compost layer. Note this
|
||||
* api will not return the percent chance for some vanilla
|
||||
* items. To get the compostable chance for all items, use the
|
||||
* compostingChance property on the ItemStack.
|
||||
* api will also return the composting chance for vanilla items
|
||||
* that are compostable but do not use the compostable item
|
||||
* component.
|
||||
*
|
||||
* @throws
|
||||
* Throws if value outside the range [1 - 100]
|
||||
@ -10608,18 +10608,6 @@ export class ItemStack {
|
||||
* Throws if the value is outside the range of 1-255.
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* @beta
|
||||
* @remarks
|
||||
* This is the percent chance of the item composting in the
|
||||
* composter block and generating a compost layer.
|
||||
*
|
||||
* @throws
|
||||
* Throws if value outside the range [1 - 100]
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
readonly compostingChance: number;
|
||||
/**
|
||||
* @remarks
|
||||
* Returns whether the item is stackable. An item is considered
|
||||
@ -12633,7 +12621,7 @@ export class PlayerInputPermissions {
|
||||
*/
|
||||
movementEnabled: boolean;
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Returns true if an input permission is enabled.
|
||||
*
|
||||
@ -12645,7 +12633,7 @@ export class PlayerInputPermissions {
|
||||
*/
|
||||
isPermissionCategoryEnabled(permissionCategory: InputPermissionCategory): boolean;
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Enable or disable an input permission. When enabled the
|
||||
* input will work, when disabled will not work.
|
||||
@ -14071,6 +14059,36 @@ export class ServerMessageAfterEventSignal {
|
||||
unsubscribe(callback: (arg: MessageReceiveAfterEvent) => void): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* @beta
|
||||
*/
|
||||
export class ShutdownBeforeEventSignal {
|
||||
private constructor();
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* This function can be called in early-execution mode.
|
||||
*
|
||||
*/
|
||||
subscribe(callback: (arg: ShutdownEvent) => void): (arg: ShutdownEvent) => void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* This function can be called in early-execution mode.
|
||||
*
|
||||
*/
|
||||
unsubscribe(callback: (arg: ShutdownEvent) => void): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* @beta
|
||||
*/
|
||||
export class ShutdownEvent {
|
||||
private constructor();
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a loaded structure template (.mcstructure file).
|
||||
* Structures can be placed in a world using the /structure
|
||||
@ -14370,6 +14388,9 @@ export class StructureManager {
|
||||
* @param options
|
||||
* Optional settings to use when generating the jigsaw
|
||||
* structure.
|
||||
* @returns
|
||||
* Returns a {@link BoundingBox} object which represents the
|
||||
* maximum bounds of the jigsaw structure.
|
||||
* @throws
|
||||
* Throws if maxDepth is outside of the range [1,20]
|
||||
* Throws if generation fails due to invalid parameters or
|
||||
@ -14386,7 +14407,7 @@ export class StructureManager {
|
||||
dimension: Dimension,
|
||||
location: Vector3,
|
||||
options?: JigsawPlaceOptions,
|
||||
): void;
|
||||
): BoundingBox;
|
||||
/**
|
||||
* @beta
|
||||
* @remarks
|
||||
@ -14407,6 +14428,9 @@ export class StructureManager {
|
||||
* @param options
|
||||
* Optional settings to use when generating the jigsaw
|
||||
* structure.
|
||||
* @returns
|
||||
* Returns a {@link BoundingBox} object which represents the
|
||||
* maximum bounds of the jigsaw structure.
|
||||
* @throws
|
||||
* Throws if generation fails due to invalid parameters or
|
||||
* jigsaw configuration.
|
||||
@ -14420,7 +14444,7 @@ export class StructureManager {
|
||||
dimension: Dimension,
|
||||
location: Vector3,
|
||||
options?: JigsawStructurePlaceOptions,
|
||||
): void;
|
||||
): BoundingBox;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -14583,6 +14607,7 @@ export class SystemAfterEvents {
|
||||
*/
|
||||
export class SystemBeforeEvents {
|
||||
private constructor();
|
||||
readonly shutdown: ShutdownBeforeEventSignal;
|
||||
/**
|
||||
* @remarks
|
||||
* Fires when the scripting watchdog shuts down the server. The
|
||||
@ -16077,6 +16102,10 @@ export interface CameraFadeTimeOptions {
|
||||
|
||||
/**
|
||||
* @beta
|
||||
*
|
||||
* Required Experiments:
|
||||
* - Third Person Cameras
|
||||
*
|
||||
*/
|
||||
export interface CameraFixedBoomOptions {
|
||||
entityOffset?: Vector3;
|
||||
@ -16108,6 +16137,10 @@ export interface CameraSetRotOptions {
|
||||
|
||||
/**
|
||||
* @beta
|
||||
*
|
||||
* Required Experiments:
|
||||
* - Focus Target Camera
|
||||
*
|
||||
*/
|
||||
export interface CameraTargetOptions {
|
||||
offsetFromTargetCenter?: Vector3;
|
||||
|
Loading…
Reference in New Issue
Block a user