mirror of
https://github.com/XeroAlpha/sapi-typedoc.git
synced 2024-11-22 17:48:50 +00:00
Compare commits
5 Commits
7dcf6b8c54
...
c337b7aeb4
Author | SHA1 | Date | |
---|---|---|---|
|
c337b7aeb4 | ||
|
c8264c3975 | ||
|
f15478a18d | ||
|
318e2c2edb | ||
|
10b315f9ef |
@ -2,7 +2,7 @@ const { createHash } = require('crypto');
|
||||
const { mkdirSync, writeFileSync, existsSync, readFileSync } = require('fs');
|
||||
const { resolve: resolvePath } = require('path');
|
||||
const { SyntaxKind } = require('ts-morph');
|
||||
const { DocumentReflection } = require('typedoc');
|
||||
const { DocumentReflection, JSX } = require('typedoc');
|
||||
|
||||
const ExampleNameOverwrite = [
|
||||
{
|
||||
@ -23,6 +23,37 @@ function hashTextShort(str) {
|
||||
return createHash('sha256').update(str).digest('hex').slice(0, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {JSX.Children} jsx
|
||||
* @param {(element: JSX.Children, traversal: () => void) => void} f
|
||||
*/
|
||||
function traversalJSX(jsx, f) {
|
||||
if (Array.isArray(jsx)) {
|
||||
for (const child of jsx) {
|
||||
traversalJSX(child, f);
|
||||
}
|
||||
} else if (jsx !== null || jsx !== undefined) {
|
||||
f(jsx, () => {
|
||||
if (typeof jsx === 'object') {
|
||||
for (const child of jsx.children) {
|
||||
traversalJSX(child, f);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function findJSXElement(jsx, predicate) {
|
||||
const elements = [];
|
||||
traversalJSX(jsx, (el, traversal) => {
|
||||
if (predicate(el)) {
|
||||
elements.push(el);
|
||||
}
|
||||
traversal();
|
||||
});
|
||||
return elements;
|
||||
}
|
||||
|
||||
const examples = {};
|
||||
|
||||
/** @type {import('./hook').Hook} */
|
||||
@ -148,6 +179,33 @@ module.exports = {
|
||||
...tsdocApplication.options.getValue('blockTags'),
|
||||
'@seeExample'
|
||||
]);
|
||||
tsdocApplication.renderer.on('beginRender', () => {
|
||||
const oldContextFactory = tsdocApplication.renderer.theme.getRenderContext;
|
||||
tsdocApplication.renderer.theme.getRenderContext = function (...args) {
|
||||
/** @type {import('typedoc').DefaultThemeRenderContext} */
|
||||
const renderContext = oldContextFactory.call(this, ...args);
|
||||
const exampleTagName = renderContext.internationalization.translateTagName('@example');
|
||||
const oldCommentTagsRender = renderContext.commentTags;
|
||||
renderContext.commentTags = (props) => {
|
||||
const jsx = oldCommentTagsRender(props);
|
||||
/** @type {JSX.Element[]} */
|
||||
const exampleTags = findJSXElement(
|
||||
jsx,
|
||||
(el) => typeof el === 'object' && el.props?.class?.includes(`tsd-tag-${exampleTagName}`)
|
||||
);
|
||||
for (const exampleTag of exampleTags) {
|
||||
const summaryTag = JSX.createElement('summary', null, exampleTag.children[0]);
|
||||
const detailsTag = JSX.createElement('details', null, [
|
||||
summaryTag,
|
||||
exampleTag.children.slice(1)
|
||||
]);
|
||||
exampleTag.children = [detailsTag];
|
||||
}
|
||||
return jsx;
|
||||
};
|
||||
return renderContext;
|
||||
};
|
||||
});
|
||||
},
|
||||
afterConvert({ tsdocProject }) {
|
||||
const exampleRefls = [];
|
||||
|
@ -22,7 +22,9 @@ module.exports = {
|
||||
if (typeof part.target === 'object' && part.target.name === part.text) {
|
||||
return;
|
||||
}
|
||||
const segments = part.text.split(/[./]/);
|
||||
const segments = part.text
|
||||
.split(/[./]/)
|
||||
.flatMap((s) => (s.startsWith('minecraft') ? ['@minecraft', s.slice(9)] : [s]));
|
||||
const probablySymbolNames = segments.map((_, i) => segments.slice(i).join('.'));
|
||||
const foundReflections = reflectionEntries
|
||||
.map(([friendlyFullName, refl]) => [
|
||||
|
15
translate-pieces/server-editor/classes/BlockUtilities.d.ts
vendored
Normal file
15
translate-pieces/server-editor/classes/BlockUtilities.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/* IMPORT */ import { Selection, minecraftserver } from '../index';
|
||||
|
||||
export class BlockUtilities {
|
||||
private constructor();
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
fillVolume(
|
||||
volume: minecraftserver.BlockVolumeBase | minecraftserver.CompoundBlockVolume | Selection,
|
||||
block?: minecraftserver.BlockPermutation | minecraftserver.BlockType | string,
|
||||
): void;
|
||||
}
|
@ -85,6 +85,30 @@ export class BrushShapeManager {
|
||||
*
|
||||
*/
|
||||
setBrushShapeOffset(offset: minecraftserver.Vector3): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
*/
|
||||
setBrushShapeVisible(visible: boolean): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
*/
|
||||
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.
|
||||
|
@ -7,6 +7,7 @@
|
||||
*/
|
||||
export class ClipboardItem {
|
||||
private constructor();
|
||||
readonly id: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Return whether there is any block content in the item
|
||||
@ -25,7 +26,7 @@ export class ClipboardItem {
|
||||
clear(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* Create a {@link @minecraft/server.CompoundBlockVolume}
|
||||
* Create a {@link minecraftserver.CompoundBlockVolume}
|
||||
* container which represents the occupied block volumes within
|
||||
* the ClipboardItem.
|
||||
* This function does not perform any write operations, and
|
||||
@ -43,7 +44,7 @@ export class ClipboardItem {
|
||||
* An optional set of write parameters which govern how the
|
||||
* ClipboardItem should be potentially applied to the world
|
||||
* @returns
|
||||
* A {@link @minecraft/server.CompoundBlockVolume} which
|
||||
* A {@link minecraftserver.CompoundBlockVolume} which
|
||||
* represents the occupied block volumes within the
|
||||
* ClipboardItem as they would be written to the world with the
|
||||
* specified {@link ClipboardWriteOptions}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { ClipboardItem, CursorAttachmentProperties, CursorProperties, minecraftserver } from '../index';
|
||||
/* IMPORT */ import { CursorProperties, CursorRay, minecraftserver } from '../index';
|
||||
|
||||
/**
|
||||
* The 3D block cursor is controlled through this read only
|
||||
@ -46,27 +46,6 @@ export class Cursor {
|
||||
* @throws This property can throw when used.
|
||||
*/
|
||||
readonly isVisible: boolean;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
attachClipboardItem(item: ClipboardItem): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
clearAttachment(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
getAttachmentProperties(): CursorAttachmentProperties;
|
||||
/**
|
||||
* @remarks
|
||||
* Get the world position of the 3D block cursor
|
||||
@ -86,6 +65,15 @@ export class Cursor {
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
getProperties(): CursorProperties;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
getRay(): CursorRay;
|
||||
/**
|
||||
* @remarks
|
||||
* Hide the 3D block cursor from view until the corresponding
|
||||
@ -121,13 +109,6 @@ export class Cursor {
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
resetToDefaultState(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
setAttachmentProperties(properties: CursorAttachmentProperties): void;
|
||||
/**
|
||||
* @remarks
|
||||
* Set the 3D block cursor properties to a given state
|
||||
|
@ -1,6 +0,0 @@
|
||||
/* IMPORT */ import { CursorAttachmentProperties } from '../index';
|
||||
|
||||
export class CursorAttachmentPropertiesChangeAfterEvent {
|
||||
private constructor();
|
||||
readonly properties: CursorAttachmentProperties;
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/* IMPORT */ import { CursorAttachmentPropertiesChangeAfterEvent } from '../index';
|
||||
|
||||
export class CursorAttachmentPropertyChangeAfterEventSignal {
|
||||
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: CursorAttachmentPropertiesChangeAfterEvent) => void,
|
||||
): (arg: CursorAttachmentPropertiesChangeAfterEvent) => void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* This function can be called in early-execution mode.
|
||||
*
|
||||
*/
|
||||
unsubscribe(callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void): void;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { BlockPaletteManager, BrushShapeManager, ClipboardManager, Cursor, EditorStructureManager, ExportManager, Extension, ExtensionContextAfterEvents, PlaytestManager, SelectionManager, SettingsManager, TransactionManager, WidgetManager, minecraftserver } from '../index';
|
||||
/* IMPORT */ import { BlockPaletteManager, BlockUtilities, BrushShapeManager, ClipboardManager, Cursor, EditorStructureManager, ExportManager, Extension, ExtensionContextAfterEvents, PlaytestManager, SelectionManager, SettingsManager, TransactionManager, WidgetManager, minecraftserver } from '../index';
|
||||
|
||||
/**
|
||||
* The extension context is a native (C++) object created for
|
||||
@ -23,6 +23,7 @@ export class ExtensionContext {
|
||||
*/
|
||||
readonly afterEvents: ExtensionContextAfterEvents;
|
||||
readonly blockPalette: BlockPaletteManager;
|
||||
readonly blockUtilities: BlockUtilities;
|
||||
readonly brushShapeManager: BrushShapeManager;
|
||||
/**
|
||||
* @remarks
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { ClipboardChangeAfterEventSignal, CurrentThemeChangeAfterEventSignal, CurrentThemeColorChangeAfterEventSignal, CursorAttachmentPropertyChangeAfterEventSignal, CursorPropertyChangeAfterEventSignal, ModeChangeAfterEventSignal, PrimarySelectionChangeAfterEventSignal } from '../index';
|
||||
/* IMPORT */ import { ClipboardChangeAfterEventSignal, CurrentThemeChangeAfterEventSignal, CurrentThemeColorChangeAfterEventSignal, CursorPropertyChangeAfterEventSignal, ModeChangeAfterEventSignal, PrimarySelectionChangeAfterEventSignal } from '../index';
|
||||
|
||||
/**
|
||||
* Contains a set of events that are available across the scope
|
||||
@ -9,7 +9,6 @@ export class ExtensionContextAfterEvents {
|
||||
readonly clipboardChange: ClipboardChangeAfterEventSignal;
|
||||
readonly currentThemeChange: CurrentThemeChangeAfterEventSignal;
|
||||
readonly currentThemeColorChange: CurrentThemeColorChangeAfterEventSignal;
|
||||
readonly cursorAttachmentPropertyChange: CursorAttachmentPropertyChangeAfterEventSignal;
|
||||
readonly cursorPropertyChange: CursorPropertyChangeAfterEventSignal;
|
||||
/**
|
||||
* @remarks
|
||||
|
@ -3,7 +3,7 @@
|
||||
export class IBlockPaletteItem {
|
||||
private constructor();
|
||||
getBlock(): minecraftserver.BlockType | undefined;
|
||||
getDisplayName(): string;
|
||||
getDisplayName(): string | undefined;
|
||||
getType(): BlockPaletteItemType;
|
||||
/**
|
||||
* @remarks
|
||||
|
@ -140,7 +140,7 @@ export class Selection {
|
||||
*
|
||||
* @param forceRelativity
|
||||
* See the description for {@link
|
||||
* @minecraft/server.CompoundBlockVolume.peekLastVolume}
|
||||
* minecraftserver.CompoundBlockVolume.peekLastVolume}
|
||||
* @returns
|
||||
* Returns undefined if the stack is empty
|
||||
*/
|
||||
@ -180,10 +180,10 @@ export class Selection {
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @param other
|
||||
* {@link @minecraft/server.CompoundBlockVolume} - set the
|
||||
* block component part of this selection to the specified
|
||||
* compound block volume. This will completely replace all
|
||||
* block volume definitions in the selection.
|
||||
* {@link minecraftserver.CompoundBlockVolume} - set the block
|
||||
* component part of this selection to the specified compound
|
||||
* block volume. This will completely replace all block volume
|
||||
* definitions in the selection.
|
||||
* {@link Selection} - replace the selection with the specified
|
||||
* selection
|
||||
* @throws This function can throw errors.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { GraphicsSettings, ThemeSettings } from '../index';
|
||||
/* IMPORT */ import { GraphicsSettings, SpeedSettings, ThemeSettings } from '../index';
|
||||
|
||||
/**
|
||||
* The SettingsManager (accessible from the {@link
|
||||
@ -13,5 +13,6 @@ export class SettingsManager {
|
||||
*
|
||||
*/
|
||||
readonly graphics: GraphicsSettings;
|
||||
readonly speed: SpeedSettings;
|
||||
readonly theme: ThemeSettings;
|
||||
}
|
15
translate-pieces/server-editor/classes/SpeedSettings.d.ts
vendored
Normal file
15
translate-pieces/server-editor/classes/SpeedSettings.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/* IMPORT */ import { SpeedSettingsPropertyTypeMap } from '../index';
|
||||
|
||||
export class SpeedSettings {
|
||||
private constructor();
|
||||
get<T extends keyof SpeedSettingsPropertyTypeMap>(property: T): SpeedSettingsPropertyTypeMap[T] | undefined;
|
||||
getAll(): SpeedSettingsPropertyTypeMap;
|
||||
/**
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
set<T extends keyof SpeedSettingsPropertyTypeMap>(property: T, value: SpeedSettingsPropertyTypeMap[T]): void;
|
||||
/**
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
setAll(properties: SpeedSettingsPropertyTypeMap): void;
|
||||
}
|
@ -10,7 +10,7 @@ export class ThemeSettings {
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
addNewTheme(id: string): void;
|
||||
addNewTheme(id: string, name?: string, sourceThemeId?: string): void;
|
||||
canThemeBeModified(id: string): boolean;
|
||||
/**
|
||||
* @remarks
|
||||
@ -23,7 +23,13 @@ export class ThemeSettings {
|
||||
deleteTheme(id: string): void;
|
||||
getCurrentTheme(): string;
|
||||
getThemeColors(id: string): Record<string, minecraftserver.RGBA> | undefined;
|
||||
getThemeList(): string[];
|
||||
getThemeIdList(): string[];
|
||||
/**
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
getThemeName(id: string): string;
|
||||
resolveColorKey(key: ThemeSettingsColorKey): minecraftserver.RGBA;
|
||||
/**
|
||||
* @remarks
|
||||
@ -34,6 +40,15 @@ export class ThemeSettings {
|
||||
* {@link Error}
|
||||
*/
|
||||
setCurrentTheme(id: string): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
setThemeName(id: string, name: string): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
|
@ -158,7 +158,7 @@ export class TransactionManager {
|
||||
/**
|
||||
* @remarks
|
||||
* Begin tracking block changes in an area defined by a {@link
|
||||
* @minecraft/server.CompoundBlockVolume}. These will be added
|
||||
* minecraftserver.CompoundBlockVolume}. These will be added
|
||||
* to a pending changes list.
|
||||
* The pending list will be added to the open transaction
|
||||
* record when a commit has been issued.
|
||||
@ -166,8 +166,8 @@ export class TransactionManager {
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @param compoundBlockVolume
|
||||
* {@link @minecraft/server.CompoundBlockVolume} to track.
|
||||
* Only non-void block locations will be tracked -- any changes
|
||||
* {@link minecraftserver.CompoundBlockVolume} to track. Only
|
||||
* non-void block locations will be tracked -- any changes
|
||||
* falling into a void/negative space will not be tracked
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
@ -194,8 +194,8 @@ export class TransactionManager {
|
||||
* Selection Volumes can also represent irregular shapes with
|
||||
* non-contiguous blocks and this tracking call will honor the
|
||||
* actual selected areas in the volume (and not the negative
|
||||
* space) (see {@link @minecraft/server.CompoundBlockVolume}
|
||||
* for more details
|
||||
* space) (see {@link minecraftserver.CompoundBlockVolume} for
|
||||
* more details
|
||||
*
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
|
@ -1,7 +1,13 @@
|
||||
/* IMPORT */ import { InvalidWidgetComponentError, InvalidWidgetError, InvalidWidgetGroupError, WidgetComponentBase, WidgetComponentEntity, WidgetComponentEntityOptions, WidgetComponentGizmo, WidgetComponentGizmoOptions, WidgetComponentGuide, WidgetComponentGuideOptions, WidgetComponentRenderPrimitive, WidgetComponentRenderPrimitiveAxialSphere, WidgetComponentRenderPrimitiveBox, WidgetComponentRenderPrimitiveDisc, WidgetComponentRenderPrimitiveLine, WidgetComponentRenderPrimitiveOptions, WidgetComponentSpline, WidgetComponentSplineOptions, WidgetComponentText, WidgetComponentTextOptions, WidgetStateChangeEventData, minecraftserver } from '../index';
|
||||
/* IMPORT */ import { ClipboardItem, InvalidWidgetComponentError, InvalidWidgetError, InvalidWidgetGroupError, WidgetComponentBase, WidgetComponentClipboard, WidgetComponentClipboardOptions, WidgetComponentEntity, WidgetComponentEntityOptions, WidgetComponentGizmo, WidgetComponentGizmoOptions, WidgetComponentGuide, WidgetComponentGuideOptions, WidgetComponentRenderPrimitive, WidgetComponentRenderPrimitiveOptions, WidgetComponentRenderPrimitiveTypeAxialSphere, WidgetComponentRenderPrimitiveTypeBox, WidgetComponentRenderPrimitiveTypeDisc, WidgetComponentRenderPrimitiveTypeLine, WidgetComponentSpline, WidgetComponentSplineOptions, WidgetComponentText, WidgetComponentTextOptions, WidgetStateChangeEventData, minecraftserver } from '../index';
|
||||
|
||||
export class Widget {
|
||||
private constructor();
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
*
|
||||
*/
|
||||
bindPositionToBlockCursor: boolean;
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
@ -20,6 +26,12 @@ export class Widget {
|
||||
*
|
||||
*/
|
||||
location: minecraftserver.Vector3;
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
*
|
||||
*/
|
||||
lockPositionToSurface: boolean;
|
||||
/**
|
||||
* @throws This property can throw when used.
|
||||
*
|
||||
@ -36,6 +48,21 @@ export class Widget {
|
||||
*/
|
||||
snapToBlockLocation: boolean;
|
||||
visible: boolean;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link Error}
|
||||
*
|
||||
* {@link InvalidWidgetError}
|
||||
*/
|
||||
addClipboardComponent(
|
||||
componentName: string,
|
||||
clipboardItem?: ClipboardItem,
|
||||
options?: WidgetComponentClipboardOptions,
|
||||
): WidgetComponentClipboard;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
@ -86,10 +113,10 @@ export class Widget {
|
||||
addRenderPrimitiveComponent(
|
||||
componentName: string,
|
||||
primitiveType:
|
||||
| WidgetComponentRenderPrimitiveAxialSphere
|
||||
| WidgetComponentRenderPrimitiveBox
|
||||
| WidgetComponentRenderPrimitiveDisc
|
||||
| WidgetComponentRenderPrimitiveLine,
|
||||
| WidgetComponentRenderPrimitiveTypeAxialSphere
|
||||
| WidgetComponentRenderPrimitiveTypeBox
|
||||
| WidgetComponentRenderPrimitiveTypeDisc
|
||||
| WidgetComponentRenderPrimitiveTypeLine,
|
||||
options?: WidgetComponentRenderPrimitiveOptions,
|
||||
): WidgetComponentRenderPrimitive;
|
||||
/**
|
||||
@ -167,8 +194,6 @@ export class Widget {
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link InvalidWidgetError}
|
||||
*
|
||||
* {@link InvalidWidgetError}
|
||||
*/
|
||||
setStateChangeEvent(eventFunction?: (arg: WidgetStateChangeEventData) => void): void;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { InvalidWidgetComponentError, Widget, WidgetComponentType, minecraftserver } from '../index';
|
||||
/* IMPORT */ import { InvalidWidgetComponentError, Widget, WidgetComponentStateChangeEventData, WidgetComponentType, minecraftserver } from '../index';
|
||||
|
||||
export class WidgetComponentBase {
|
||||
private constructor();
|
||||
@ -14,6 +14,12 @@ export class WidgetComponentBase {
|
||||
* {@link minecraftserver.InvalidWidgetComponentError}
|
||||
*/
|
||||
readonly location: minecraftserver.Vector3;
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
*
|
||||
*/
|
||||
lockToSurface: boolean;
|
||||
/**
|
||||
* @throws This property can throw when used.
|
||||
*
|
||||
@ -43,4 +49,13 @@ export class WidgetComponentBase {
|
||||
* {@link InvalidWidgetComponentError}
|
||||
*/
|
||||
delete(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link InvalidWidgetComponentError}
|
||||
*/
|
||||
setStateChangeEvent(eventFunction?: (arg: WidgetComponentStateChangeEventData) => void): void;
|
||||
}
|
12
translate-pieces/server-editor/classes/WidgetComponentClipboard.d.ts
vendored
Normal file
12
translate-pieces/server-editor/classes/WidgetComponentClipboard.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
/* IMPORT */ import { WidgetComponentBase, minecraftserver } from '../index';
|
||||
|
||||
export class WidgetComponentClipboard extends WidgetComponentBase {
|
||||
private constructor();
|
||||
clipboardMirror: minecraftserver.StructureMirrorAxis;
|
||||
clipboardNormalizedOrigin: minecraftserver.Vector3;
|
||||
clipboardOffset: minecraftserver.Vector3;
|
||||
clipboardRotation: minecraftserver.StructureRotation;
|
||||
fillColor: minecraftserver.RGBA;
|
||||
outlineColor: minecraftserver.RGBA;
|
||||
showBounds: boolean;
|
||||
}
|
@ -2,4 +2,5 @@
|
||||
|
||||
export class WidgetComponentGizmo extends WidgetComponentBase {
|
||||
private constructor();
|
||||
activated: boolean;
|
||||
}
|
@ -1,7 +1,15 @@
|
||||
/* IMPORT */ import { InvalidWidgetComponentError, InvalidWidgetError, WidgetComponentBase, WidgetComponentRenderPrimitiveAxialSphere, WidgetComponentRenderPrimitiveBox, WidgetComponentRenderPrimitiveDisc, WidgetComponentRenderPrimitiveLine } from '../index';
|
||||
/* IMPORT */ import { InvalidWidgetComponentError, InvalidWidgetError, PrimitiveType, WidgetComponentBase, WidgetComponentRenderPrimitiveTypeAxialSphere, WidgetComponentRenderPrimitiveTypeBox, WidgetComponentRenderPrimitiveTypeDisc, WidgetComponentRenderPrimitiveTypeLine } from '../index';
|
||||
|
||||
export class WidgetComponentRenderPrimitive extends WidgetComponentBase {
|
||||
private constructor();
|
||||
/**
|
||||
* @throws This property can throw when used.
|
||||
*
|
||||
* {@link InvalidWidgetComponentError}
|
||||
*
|
||||
* {@link InvalidWidgetError}
|
||||
*/
|
||||
readonly primitiveType: PrimitiveType;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
@ -14,9 +22,9 @@ export class WidgetComponentRenderPrimitive extends WidgetComponentBase {
|
||||
*/
|
||||
setPrimitive(
|
||||
primitive:
|
||||
| WidgetComponentRenderPrimitiveAxialSphere
|
||||
| WidgetComponentRenderPrimitiveBox
|
||||
| WidgetComponentRenderPrimitiveDisc
|
||||
| WidgetComponentRenderPrimitiveLine,
|
||||
| WidgetComponentRenderPrimitiveTypeAxialSphere
|
||||
| WidgetComponentRenderPrimitiveTypeBox
|
||||
| WidgetComponentRenderPrimitiveTypeDisc
|
||||
| WidgetComponentRenderPrimitiveTypeLine,
|
||||
): void;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
/* IMPORT */ import { minecraftserver } from '../index';
|
||||
/* IMPORT */ import { WidgetComponentRenderPrimitiveTypeBase, minecraftserver } from '../index';
|
||||
|
||||
export class WidgetComponentRenderPrimitiveAxialSphere {
|
||||
export class WidgetComponentRenderPrimitiveTypeAxialSphere extends WidgetComponentRenderPrimitiveTypeBase {
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
6
translate-pieces/server-editor/classes/WidgetComponentRenderPrimitiveTypeBase.d.ts
vendored
Normal file
6
translate-pieces/server-editor/classes/WidgetComponentRenderPrimitiveTypeBase.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/* IMPORT */ import { PrimitiveType } from '../index';
|
||||
|
||||
export class WidgetComponentRenderPrimitiveTypeBase {
|
||||
private constructor();
|
||||
readonly primitiveType: PrimitiveType;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
/* IMPORT */ import { minecraftserver } from '../index';
|
||||
/* IMPORT */ import { WidgetComponentRenderPrimitiveTypeBase, minecraftserver } from '../index';
|
||||
|
||||
export class WidgetComponentRenderPrimitiveBox {
|
||||
export class WidgetComponentRenderPrimitiveTypeBox extends WidgetComponentRenderPrimitiveTypeBase {
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
@ -1,6 +1,6 @@
|
||||
/* IMPORT */ import { minecraftserver } from '../index';
|
||||
/* IMPORT */ import { WidgetComponentRenderPrimitiveTypeBase, minecraftserver } from '../index';
|
||||
|
||||
export class WidgetComponentRenderPrimitiveDisc {
|
||||
export class WidgetComponentRenderPrimitiveTypeDisc extends WidgetComponentRenderPrimitiveTypeBase {
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
@ -1,6 +1,6 @@
|
||||
/* IMPORT */ import { minecraftserver } from '../index';
|
||||
/* IMPORT */ import { WidgetComponentRenderPrimitiveTypeBase, minecraftserver } from '../index';
|
||||
|
||||
export class WidgetComponentRenderPrimitiveLine {
|
||||
export class WidgetComponentRenderPrimitiveTypeLine extends WidgetComponentRenderPrimitiveTypeBase {
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
9
translate-pieces/server-editor/classes/WidgetComponentStateChangeEventData.d.ts
vendored
Normal file
9
translate-pieces/server-editor/classes/WidgetComponentStateChangeEventData.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
/* IMPORT */ import { Widget, WidgetComponentBase, WidgetGroup } from '../index';
|
||||
|
||||
export class WidgetComponentStateChangeEventData {
|
||||
private constructor();
|
||||
readonly component: WidgetComponentBase;
|
||||
readonly gizmoActivated?: boolean;
|
||||
readonly group: WidgetGroup;
|
||||
readonly widget: Widget;
|
||||
}
|
5
translate-pieces/server-editor/enums/Axis.d.ts
vendored
Normal file
5
translate-pieces/server-editor/enums/Axis.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
export enum Axis {
|
||||
X = 1,
|
||||
Y = 2,
|
||||
Z = 4,
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
export enum BlockMaskListType {
|
||||
Disabled = 'Disabled',
|
||||
Mask = 'Mask',
|
||||
Replace = 'Replace',
|
||||
}
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
export enum GraphicsSettingsProperty {
|
||||
ShowChunkBoundaries = 'ShowChunkBoundaries',
|
||||
ShowCompass = 'ShowCompass',
|
||||
/**
|
||||
* @remarks
|
||||
* Manages rendering of invisible blocks (e.g., barrier, light,
|
||||
|
@ -1,4 +1,7 @@
|
||||
export enum PaintMode {
|
||||
BlockPaint = 0,
|
||||
FreehandSelect = 1,
|
||||
Smooth = 2,
|
||||
Roughen = 3,
|
||||
Flatten = 4,
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
export enum Plane {
|
||||
XY = 'XY',
|
||||
XZ = 'XZ',
|
||||
YZ = 'YZ',
|
||||
XY = 1,
|
||||
XZ = 2,
|
||||
YZ = 4,
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
export enum PrimitiveType {
|
||||
AxialSphere = 'AxialSphere',
|
||||
Box = 'Box',
|
||||
Disc = 'Disc',
|
||||
Line = 'Line',
|
||||
Text = 'Text',
|
||||
Text = 0,
|
||||
Box = 1,
|
||||
Line = 2,
|
||||
Disc = 4,
|
||||
AxialSphere = 5,
|
||||
}
|
3
translate-pieces/server-editor/enums/SpeedSettingsProperty.d.ts
vendored
Normal file
3
translate-pieces/server-editor/enums/SpeedSettingsProperty.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export enum SpeedSettingsProperty {
|
||||
FlySpeedMultiplier = 'FlySpeedMultiplier',
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
export enum SplineType {
|
||||
Hermite = 'Hermite',
|
||||
Line = 'Line',
|
||||
Line = 0,
|
||||
Hermite = 1,
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
export enum WidgetComponentType {
|
||||
Clipboard = 'Clipboard',
|
||||
Entity = 'Entity',
|
||||
Gizmo = 'Gizmo',
|
||||
Guide = 'Guide',
|
||||
|
55
translate-pieces/server-editor/index.d.ts
vendored
55
translate-pieces/server-editor/index.d.ts
vendored
@ -3,6 +3,7 @@ import * as minecraftserver from '../server';
|
||||
/* PRIVATE */ export { minecraftcommon };
|
||||
/* PRIVATE */ export { minecraftserver };
|
||||
export { ActionTypes } from './enums/ActionTypes';
|
||||
export { Axis } from './enums/Axis';
|
||||
export { BlockMaskListType } from './enums/BlockMaskListType';
|
||||
export { BlockPaletteItemType } from './enums/BlockPaletteItemType';
|
||||
export { BoolPropertyItemVariant } from './enums/BoolPropertyItemVariant';
|
||||
@ -38,17 +39,18 @@ export { PrimitiveType } from './enums/PrimitiveType';
|
||||
export { ProjectExportType } from './enums/ProjectExportType';
|
||||
export { PropertyItemType } from './enums/PropertyItemType';
|
||||
export { SimpleToolStatusBarVisibility } from './enums/SimpleToolStatusBarVisibility';
|
||||
export { SpeedSettingsProperty } from './enums/SpeedSettingsProperty';
|
||||
export { SplineType } from './enums/SplineType';
|
||||
export { StatusBarAlignment } from './enums/StatusBarAlignment';
|
||||
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 { 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';
|
||||
@ -70,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';
|
||||
@ -80,6 +83,7 @@ export { BedrockEventSubscriptionCache } from './classes/BedrockEventSubscriptio
|
||||
export { BlockIdentifierObservableValidator } from './classes/BlockIdentifierObservableValidator';
|
||||
export { BlockPalette } from './classes/BlockPalette';
|
||||
export { BlockPaletteManager } from './classes/BlockPaletteManager';
|
||||
export { BlockUtilities } from './classes/BlockUtilities';
|
||||
export { BrushShapeManager } from './classes/BrushShapeManager';
|
||||
export { ClipboardChangeAfterEvent } from './classes/ClipboardChangeAfterEvent';
|
||||
export { ClipboardChangeAfterEventSignal } from './classes/ClipboardChangeAfterEventSignal';
|
||||
@ -90,8 +94,6 @@ export { CurrentThemeChangeAfterEventSignal } from './classes/CurrentThemeChange
|
||||
export { CurrentThemeColorChangeAfterEvent } from './classes/CurrentThemeColorChangeAfterEvent';
|
||||
export { CurrentThemeColorChangeAfterEventSignal } from './classes/CurrentThemeColorChangeAfterEventSignal';
|
||||
export { Cursor } from './classes/Cursor';
|
||||
export { CursorAttachmentPropertiesChangeAfterEvent } from './classes/CursorAttachmentPropertiesChangeAfterEvent';
|
||||
export { CursorAttachmentPropertyChangeAfterEventSignal } from './classes/CursorAttachmentPropertyChangeAfterEventSignal';
|
||||
export { CursorPropertiesChangeAfterEvent } from './classes/CursorPropertiesChangeAfterEvent';
|
||||
export { CursorPropertyChangeAfterEventSignal } from './classes/CursorPropertyChangeAfterEventSignal';
|
||||
export { EditorStructureManager } from './classes/EditorStructureManager';
|
||||
@ -120,6 +122,7 @@ export { SettingsUIElement } from './classes/SettingsUIElement';
|
||||
export { SimpleBlockPaletteItem } from './classes/SimpleBlockPaletteItem';
|
||||
export { SimpleToolWrapper } from './classes/SimpleToolWrapper';
|
||||
export { SimulationState } from './classes/SimulationState';
|
||||
export { SpeedSettings } from './classes/SpeedSettings';
|
||||
export { ThemeSettings } from './classes/ThemeSettings';
|
||||
export { TransactionManager } from './classes/TransactionManager';
|
||||
export { UserDefinedTransactionHandle } from './classes/UserDefinedTransactionHandle';
|
||||
@ -127,45 +130,35 @@ export { UserDefinedTransactionHandlerId } from './classes/UserDefinedTransactio
|
||||
export { Vector3LimitObservableValidator } from './classes/Vector3LimitObservableValidator';
|
||||
export { Widget } from './classes/Widget';
|
||||
export { WidgetComponentBase } from './classes/WidgetComponentBase';
|
||||
export { WidgetComponentClipboard } from './classes/WidgetComponentClipboard';
|
||||
export { WidgetComponentEntity } from './classes/WidgetComponentEntity';
|
||||
export { WidgetComponentGizmo } from './classes/WidgetComponentGizmo';
|
||||
export { WidgetComponentGuide } from './classes/WidgetComponentGuide';
|
||||
export { WidgetComponentRenderPrimitive } from './classes/WidgetComponentRenderPrimitive';
|
||||
export { WidgetComponentRenderPrimitiveAxialSphere } from './classes/WidgetComponentRenderPrimitiveAxialSphere';
|
||||
export { WidgetComponentRenderPrimitiveBox } from './classes/WidgetComponentRenderPrimitiveBox';
|
||||
export { WidgetComponentRenderPrimitiveDisc } from './classes/WidgetComponentRenderPrimitiveDisc';
|
||||
export { WidgetComponentRenderPrimitiveLine } from './classes/WidgetComponentRenderPrimitiveLine';
|
||||
export { WidgetComponentRenderPrimitiveTypeAxialSphere } from './classes/WidgetComponentRenderPrimitiveTypeAxialSphere';
|
||||
export { WidgetComponentRenderPrimitiveTypeBase } from './classes/WidgetComponentRenderPrimitiveTypeBase';
|
||||
export { WidgetComponentRenderPrimitiveTypeBox } from './classes/WidgetComponentRenderPrimitiveTypeBox';
|
||||
export { WidgetComponentRenderPrimitiveTypeDisc } from './classes/WidgetComponentRenderPrimitiveTypeDisc';
|
||||
export { WidgetComponentRenderPrimitiveTypeLine } from './classes/WidgetComponentRenderPrimitiveTypeLine';
|
||||
export { WidgetComponentSpline } from './classes/WidgetComponentSpline';
|
||||
export { WidgetComponentStateChangeEventData } from './classes/WidgetComponentStateChangeEventData';
|
||||
export { WidgetComponentText } from './classes/WidgetComponentText';
|
||||
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 { CursorAttachmentProperties } from './interfaces/CursorAttachmentProperties';
|
||||
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 { 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';
|
||||
@ -238,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';
|
||||
|
@ -5,21 +5,6 @@
|
||||
* is being written to the world
|
||||
*/
|
||||
export interface ClipboardWriteOptions {
|
||||
/**
|
||||
* @remarks
|
||||
* The anchor is a unit vector representation of the side or
|
||||
* corner of the Clipboard Item to be written to the world.
|
||||
* `{0, 0, 0}` represents the center of the Clipboard item,
|
||||
* `{0, 1, 0}` represents the top, `{-1, -1, -1}` represents
|
||||
* the bottom/back/left corner, etc
|
||||
* The anchor is used in conjunction with the item size to
|
||||
* determine the object relative anchor point where the object
|
||||
* will be applied in the world.
|
||||
* Values for the X/Y/Z components should be within the range
|
||||
* `(-1 <= X/Y/Z <=1)`
|
||||
*
|
||||
*/
|
||||
anchor?: minecraftserver.Vector3;
|
||||
/**
|
||||
* @remarks
|
||||
* An enum which represents the axis (or combination of axis')
|
||||
@ -30,6 +15,7 @@ export interface ClipboardWriteOptions {
|
||||
*
|
||||
*/
|
||||
mirror?: minecraftserver.StructureMirrorAxis;
|
||||
normalizedOrigin?: minecraftserver.Vector3;
|
||||
/**
|
||||
* @remarks
|
||||
* A position offset which should be applied to the paste
|
||||
|
@ -1,13 +0,0 @@
|
||||
/* IMPORT */ import { minecraftserver } from '../index';
|
||||
|
||||
export interface CursorAttachmentProperties {
|
||||
boundsFillColor?: minecraftserver.RGBA;
|
||||
boundsVisible?: boolean;
|
||||
boundsWireframeColor?: minecraftserver.RGBA;
|
||||
contentsFillColor?: minecraftserver.RGBA;
|
||||
contentsWireframeColor?: minecraftserver.RGBA;
|
||||
mirror?: minecraftserver.StructureMirrorAxis;
|
||||
offset?: minecraftserver.Vector3;
|
||||
origin?: minecraftserver.Vector3;
|
||||
rotation?: minecraftserver.StructureRotation;
|
||||
}
|
7
translate-pieces/server-editor/interfaces/CursorRay.d.ts
vendored
Normal file
7
translate-pieces/server-editor/interfaces/CursorRay.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
/* IMPORT */ import { minecraftserver } from '../index';
|
||||
|
||||
export interface CursorRay {
|
||||
end: minecraftserver.Vector3;
|
||||
hit: boolean;
|
||||
start: minecraftserver.Vector3;
|
||||
}
|
@ -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;
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* IMPORT */ import { EventSink, IPropertyPane, KeyBinding, KeyBindingInfo, ModalToolLifecycleEventPayload, SupportedKeyboardActionTypes, SupportedMouseActionTypes } from '../index';
|
||||
/* IMPORT */ import { EventSink, IRootPropertyPane, KeyBinding, KeyBindingInfo, ModalToolLifecycleEventPayload, SupportedKeyboardActionTypes, SupportedMouseActionTypes } from '../index';
|
||||
|
||||
export interface IModalTool {
|
||||
/**
|
||||
* @remarks
|
||||
* Unique ID for the tool
|
||||
* Unique identifier for the tool
|
||||
*
|
||||
*/
|
||||
readonly id: string;
|
||||
@ -13,13 +13,10 @@ export interface IModalTool {
|
||||
*
|
||||
*/
|
||||
onModalToolActivation: EventSink<ModalToolLifecycleEventPayload>;
|
||||
bindPropertyPane(pane: IPropertyPane): void;
|
||||
dispose(): void;
|
||||
hide(): void;
|
||||
bindPropertyPane(pane: IRootPropertyPane): void;
|
||||
registerKeyBinding(action: SupportedKeyboardActionTypes, binding: KeyBinding, info?: KeyBindingInfo): void;
|
||||
registerMouseButtonBinding(action: SupportedMouseActionTypes): void;
|
||||
registerMouseDragBinding(action: SupportedMouseActionTypes): void;
|
||||
registerMouseWheelBinding(action: SupportedMouseActionTypes): void;
|
||||
show(): void;
|
||||
unregisterInputBindings(): void;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { IModalTool, ModalToolCreationParameters, NoArgsAction, RegisteredAction } from '../index';
|
||||
/* IMPORT */ import { IModalTool, ModalToolCreationParameters } from '../index';
|
||||
|
||||
export interface IModalToolContainer {
|
||||
/**
|
||||
@ -7,7 +7,7 @@ export interface IModalToolContainer {
|
||||
*
|
||||
*/
|
||||
readonly currentTools: IModalTool[];
|
||||
addTool(params: ModalToolCreationParameters, action?: RegisteredAction<NoArgsAction>): IModalTool;
|
||||
addTool(id: string, params: ModalToolCreationParameters): IModalTool;
|
||||
focusToolInputContext(): void;
|
||||
getSelectedToolId(): string | undefined;
|
||||
removeTool(id: string): void;
|
||||
|
@ -15,6 +15,12 @@
|
||||
* the editor evolves.
|
||||
*/
|
||||
export interface ISimpleTool {
|
||||
/**
|
||||
* @remarks
|
||||
* Get the tool unique id
|
||||
*
|
||||
*/
|
||||
get id(): string;
|
||||
/**
|
||||
* @remarks
|
||||
* Get a reference to the menu component that was automatically
|
||||
|
@ -18,6 +18,12 @@ export interface ISimpleToolOptions {
|
||||
*
|
||||
*/
|
||||
activationKeyBinding?: ISimpleToolKeyBinding;
|
||||
/**
|
||||
* @remarks
|
||||
* The unique identifier of the tool.
|
||||
*
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* @remarks
|
||||
* The name of the tool. This will be used to identify the tool
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { ISimpleToolPaneComponent } from '../index';
|
||||
/* IMPORT */ import { ISimpleToolPaneComponent, TooltipInteractiveContent } from '../index';
|
||||
|
||||
/**
|
||||
* A set of options which define the basic properties of a
|
||||
@ -53,6 +53,12 @@ export interface ISimpleToolPaneOptions {
|
||||
*
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Information tooltip displayed on the root pane header.
|
||||
*
|
||||
*/
|
||||
infoTooltip?: TooltipInteractiveContent;
|
||||
onBeginFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
||||
onEndFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
||||
onHide?: (pane: ISimpleToolPaneComponent) => void;
|
||||
|
@ -1,34 +1,30 @@
|
||||
/* IMPORT */ import { NoArgsAction, RegisteredAction } from '../index';
|
||||
|
||||
/**
|
||||
* Parameters for creating a modal tool in the tool container
|
||||
*/
|
||||
export interface ModalToolCreationParameters {
|
||||
/**
|
||||
* @remarks
|
||||
* Icon, if any (from resource pack on client)
|
||||
* Action associated with tool activation
|
||||
*
|
||||
*/
|
||||
action?: RegisteredAction<NoArgsAction>;
|
||||
/**
|
||||
* @remarks
|
||||
* Icon resource
|
||||
*
|
||||
*/
|
||||
icon?: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Modal input context identifier
|
||||
* Localized title of the tool
|
||||
*
|
||||
*/
|
||||
inputContextId?: string;
|
||||
title?: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Localized text label for modal input context
|
||||
*
|
||||
*/
|
||||
inputContextLabel?: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Title of the tool
|
||||
*
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Tooltip description of the toll
|
||||
* Tooltip description of the tool
|
||||
*
|
||||
*/
|
||||
tooltip?: string;
|
||||
|
@ -1,6 +1,8 @@
|
||||
/* IMPORT */ import { minecraftserver } from '../index';
|
||||
/* IMPORT */ import { WidgetComponentStateChangeEventData, minecraftserver } from '../index';
|
||||
|
||||
export interface WidgetComponentBaseOptions {
|
||||
lockToSurface?: boolean;
|
||||
offset?: minecraftserver.Vector3;
|
||||
stateChangeEvent?: (arg: WidgetComponentStateChangeEventData) => void;
|
||||
visible?: boolean;
|
||||
}
|
11
translate-pieces/server-editor/interfaces/WidgetComponentClipboardOptions.d.ts
vendored
Normal file
11
translate-pieces/server-editor/interfaces/WidgetComponentClipboardOptions.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
/* IMPORT */ import { WidgetComponentBaseOptions, minecraftserver } from '../index';
|
||||
|
||||
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;
|
||||
}
|
@ -1,3 +1,6 @@
|
||||
/* IMPORT */ import { WidgetComponentBaseOptions } from '../index';
|
||||
/* IMPORT */ import { Axis, WidgetComponentBaseOptions } from '../index';
|
||||
|
||||
export interface WidgetComponentGizmoOptions extends WidgetComponentBaseOptions {}
|
||||
export interface WidgetComponentGizmoOptions extends WidgetComponentBaseOptions {
|
||||
axes?: Axis;
|
||||
enablePlanes?: boolean;
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
/* IMPORT */ import { WidgetStateChangeEventData, minecraftserver } from '../index';
|
||||
|
||||
export interface WidgetCreateOptions {
|
||||
bindPositionToBlockCursor?: boolean;
|
||||
collisionOffset?: minecraftserver.Vector3;
|
||||
collisionRadius?: number;
|
||||
lockToSurface?: boolean;
|
||||
selectable?: boolean;
|
||||
snapToBlockLocation?: boolean;
|
||||
stateChangeEvent?: (arg: WidgetStateChangeEventData) => void;
|
||||
|
@ -6,4 +6,5 @@
|
||||
export type GraphicsSettingsPropertyTypeMap = {
|
||||
[GraphicsSettingsProperty.ShowInvisibleBlocks]?: boolean;
|
||||
[GraphicsSettingsProperty.ShowChunkBoundaries]?: boolean;
|
||||
[GraphicsSettingsProperty.ShowCompass]?: boolean;
|
||||
};
|
5
translate-pieces/server-editor/types/SpeedSettingsPropertyTypeMap.d.ts
vendored
Normal file
5
translate-pieces/server-editor/types/SpeedSettingsPropertyTypeMap.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
/* IMPORT */ import { SpeedSettingsProperty } from '../index';
|
||||
|
||||
export type SpeedSettingsPropertyTypeMap = {
|
||||
[SpeedSettingsProperty.FlySpeedMultiplier]?: number;
|
||||
};
|
@ -5,8 +5,8 @@
|
||||
* 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 {@link @minecraft/server.Player} type. Note that
|
||||
* many types of events that may be available for entities more
|
||||
* from the {@link 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.
|
||||
*/
|
||||
|
@ -487,7 +487,7 @@ export class Test {
|
||||
/**
|
||||
* @remarks
|
||||
* Returns the direction of the current test - see the {@link
|
||||
* @minecraft/server.Direction} enum for more information on
|
||||
* minecraftserver.Direction} enum for more information on
|
||||
* potential values (north, east, south, west - values 2-5).
|
||||
*
|
||||
*/
|
||||
@ -731,8 +731,8 @@ export class Test {
|
||||
* @param location
|
||||
* Location of the fluid container block.
|
||||
* @param type
|
||||
* Type of fluid to set. See {@link
|
||||
* @minecraft/server.FluidType} for a list of values.
|
||||
* Type of fluid to set. See {@link minecraftserver.FluidType}
|
||||
* for a list of values.
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link GameTestError}
|
||||
|
@ -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',
|
||||
|
1
translate-pieces/server/classes/Block.d.ts
vendored
1
translate-pieces/server/classes/Block.d.ts
vendored
@ -259,7 +259,6 @@ export class Block {
|
||||
*/
|
||||
getMapColor(): RGBA;
|
||||
/**
|
||||
* @rc
|
||||
* @remarks
|
||||
* Returns the net redstone power of this block.
|
||||
*
|
||||
|
@ -1,7 +1,6 @@
|
||||
/* IMPORT */ import { Vector3 } from '../index';
|
||||
|
||||
/**
|
||||
* @rc
|
||||
* A BlockLocationIterator returns the next block location of
|
||||
* the block volume across which it is iterating.
|
||||
* The BlockLocationIterator is used to abstract the shape of
|
||||
|
@ -1,7 +1,6 @@
|
||||
/* IMPORT */ import { BlockVolumeBase, BlockVolumeIntersection, Vector3 } from '../index';
|
||||
|
||||
/**
|
||||
* @rc
|
||||
* A BlockVolume is a simple interface to an object which
|
||||
* represents a 3D rectangle of a given size (in blocks) at a
|
||||
* world block location.
|
||||
|
@ -6,7 +6,6 @@
|
||||
export class BlockVolumeBase {
|
||||
private constructor();
|
||||
/**
|
||||
* @rc
|
||||
* @remarks
|
||||
* Fetch a {@link BlockLocationIterator} that represents all of
|
||||
* the block world locations within the specified volume
|
||||
|
5
translate-pieces/server/classes/Camera.d.ts
vendored
5
translate-pieces/server/classes/Camera.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { CameraDefaultOptions, CameraFadeOptions, CameraFixedBoomOptions, CameraSetFacingOptions, CameraSetLocationOptions, CameraSetPosOptions, CameraSetRotOptions } from '../index';
|
||||
/* IMPORT */ import { CameraDefaultOptions, CameraFadeOptions, CameraFixedBoomOptions, CameraSetFacingOptions, CameraSetLocationOptions, CameraSetPosOptions, CameraSetRotOptions, CameraTargetOptions } from '../index';
|
||||
|
||||
/**
|
||||
* Contains methods relating to the active camera for the
|
||||
@ -50,6 +50,7 @@ export class Camera {
|
||||
| CameraSetFacingOptions
|
||||
| CameraSetLocationOptions
|
||||
| CameraSetPosOptions
|
||||
| CameraSetRotOptions,
|
||||
| CameraSetRotOptions
|
||||
| CameraTargetOptions,
|
||||
): void;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
/* IMPORT */ import { PlatformType, SystemInfo } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* Contains the device information for a client instance.
|
||||
*/
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
|
19
translate-pieces/server/classes/Dimension.d.ts
vendored
19
translate-pieces/server/classes/Dimension.d.ts
vendored
@ -20,7 +20,7 @@ export class Dimension {
|
||||
*/
|
||||
readonly id: string;
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Searches the block volume for a block that satisfies the
|
||||
* block filter.
|
||||
@ -68,20 +68,23 @@ export class Dimension {
|
||||
*/
|
||||
createExplosion(location: Vector3, radius: number, explosionOptions?: ExplosionOptions): boolean;
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Fills an area between begin and end with block of type
|
||||
* block.
|
||||
* Fills an area of blocks with a specific block type.
|
||||
*
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @param volume
|
||||
* Volume of blocks to be filled.
|
||||
* @param block
|
||||
* Type of block to fill the volume with.
|
||||
* @param options
|
||||
* A set of additional options, such as a matching block to
|
||||
* potentially replace this fill block with.
|
||||
* A set of additional options, such as a block filter which
|
||||
* can be used to include / exclude specific blocks in the
|
||||
* fill.
|
||||
* @returns
|
||||
* Returns number of blocks placed.
|
||||
* Returns a ListBlockVolume which contains all the blocks that
|
||||
* were placed.
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link minecraftcommon.EngineError}
|
||||
@ -176,7 +179,7 @@ export class Dimension {
|
||||
*/
|
||||
getBlockFromRay(location: Vector3, direction: Vector3, options?: BlockRaycastOptions): BlockRaycastHit | undefined;
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Gets all the blocks in a volume that satisfy the filter.
|
||||
*
|
||||
|
@ -1,7 +1,6 @@
|
||||
/* IMPORT */ import { BlockPermutation, EntityComponent } from '../index';
|
||||
|
||||
/**
|
||||
* @rc
|
||||
* Defines what blocks this entity can breathe in and gives
|
||||
* them the ability to suffocate.
|
||||
*/
|
||||
|
16
translate-pieces/server/classes/InputInfo.d.ts
vendored
16
translate-pieces/server/classes/InputInfo.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { InputMode, InvalidEntityError, minecraftcommon } from '../index';
|
||||
/* IMPORT */ import { ButtonState, InputButton, InputMode, InvalidEntityError, Vector2, minecraftcommon } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
@ -27,4 +27,18 @@ export class InputInfo {
|
||||
* {@link InvalidEntityError}
|
||||
*/
|
||||
readonly touchOnlyAffectsHotbar: boolean;
|
||||
/**
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link minecraftcommon.EngineError}
|
||||
*
|
||||
* {@link InvalidEntityError}
|
||||
*/
|
||||
getButtonState(button: InputButton): ButtonState;
|
||||
/**
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link InvalidEntityError}
|
||||
*/
|
||||
getMovementVector(): Vector2;
|
||||
}
|
@ -1,7 +1,3 @@
|
||||
/**
|
||||
* @rc
|
||||
*/
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export class InvalidIteratorError extends Error {
|
||||
private constructor();
|
||||
}
|
26
translate-pieces/server/classes/ItemCompostableComponent.d.ts
vendored
Normal file
26
translate-pieces/server/classes/ItemCompostableComponent.d.ts
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
/* IMPORT */ import { ItemComponent } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* When present, the item can be composted in the composter
|
||||
* block if the composting chance is in the range [1 - 100].
|
||||
*/
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export class ItemCompostableComponent extends ItemComponent {
|
||||
private constructor();
|
||||
/**
|
||||
* @remarks
|
||||
* This is the percent chance of the item composting in the
|
||||
* composter block and generating a compost layer. Note this
|
||||
* 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]
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
readonly compostingChance: number;
|
||||
static readonly componentId = 'minecraft:compostable';
|
||||
}
|
@ -27,7 +27,7 @@ export class ItemUseOnAfterEvent {
|
||||
*/
|
||||
readonly faceLocation: Vector3;
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* This value will be true if the event was triggered on
|
||||
* players initial interaction button press and false on events
|
||||
|
2
translate-pieces/server/classes/Player.d.ts
vendored
2
translate-pieces/server/classes/Player.d.ts
vendored
@ -14,7 +14,7 @@ export class Player extends Entity {
|
||||
*/
|
||||
readonly camera: Camera;
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Contains the player's device information.
|
||||
*
|
||||
|
27
translate-pieces/server/classes/PlayerButtonInputAfterEvent.d.ts
vendored
Normal file
27
translate-pieces/server/classes/PlayerButtonInputAfterEvent.d.ts
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/* IMPORT */ import { ButtonState, InputButton, Player } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* Event data for when a player presses a button.
|
||||
*/
|
||||
export class PlayerButtonInputAfterEvent {
|
||||
private constructor();
|
||||
/**
|
||||
* @remarks
|
||||
* The button this event is about.
|
||||
*
|
||||
*/
|
||||
readonly button: InputButton;
|
||||
/**
|
||||
* @remarks
|
||||
* The state that this button transferred to.
|
||||
*
|
||||
*/
|
||||
readonly newButtonState: ButtonState;
|
||||
/**
|
||||
* @remarks
|
||||
* The player that performed the input event.
|
||||
*
|
||||
*/
|
||||
readonly player: Player;
|
||||
}
|
34
translate-pieces/server/classes/PlayerButtonInputAfterEventSignal.d.ts
vendored
Normal file
34
translate-pieces/server/classes/PlayerButtonInputAfterEventSignal.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
/* IMPORT */ import { InputEventOptions, PlayerButtonInputAfterEvent } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* Manages callbacks that are connected to player inputs.
|
||||
*/
|
||||
export class PlayerButtonInputAfterEventSignal {
|
||||
private constructor();
|
||||
/**
|
||||
* @remarks
|
||||
* Adds a callback that will be called after the player
|
||||
* performs an input.
|
||||
*
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* This function can be called in early-execution mode.
|
||||
*
|
||||
*/
|
||||
subscribe(
|
||||
callback: (arg: PlayerButtonInputAfterEvent) => void,
|
||||
options?: InputEventOptions,
|
||||
): (arg: PlayerButtonInputAfterEvent) => void;
|
||||
/**
|
||||
* @remarks
|
||||
* Removes a callback from being called after the player
|
||||
* performs an input.
|
||||
*
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* This function can be called in early-execution mode.
|
||||
*
|
||||
*/
|
||||
unsubscribe(callback: (arg: PlayerButtonInputAfterEvent) => void): void;
|
||||
}
|
@ -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.
|
||||
|
@ -7,7 +7,6 @@
|
||||
export class PlayerInteractWithBlockAfterEvent {
|
||||
private constructor();
|
||||
/**
|
||||
* @rc
|
||||
* @remarks
|
||||
* The ItemStack before the interaction succeeded, or undefined
|
||||
* if hand is empty.
|
||||
@ -34,7 +33,6 @@ export class PlayerInteractWithBlockAfterEvent {
|
||||
*/
|
||||
readonly faceLocation: Vector3;
|
||||
/**
|
||||
* @rc
|
||||
* @remarks
|
||||
* This value will be true if the event was triggered on
|
||||
* players initial interaction button press and false on events
|
||||
|
@ -32,7 +32,6 @@ export class PlayerInteractWithBlockBeforeEvent {
|
||||
*/
|
||||
readonly faceLocation: Vector3;
|
||||
/**
|
||||
* @rc
|
||||
* @remarks
|
||||
* This value will be true if the event was triggered on
|
||||
* players initial interaction button press and false on events
|
||||
|
@ -7,7 +7,6 @@
|
||||
export class PlayerInteractWithEntityAfterEvent {
|
||||
private constructor();
|
||||
/**
|
||||
* @rc
|
||||
* @remarks
|
||||
* The ItemStack before the interaction succeeded, or undefined
|
||||
* if hand is empty.
|
||||
|
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;
|
||||
}
|
5
translate-pieces/server/classes/System.d.ts
vendored
5
translate-pieces/server/classes/System.d.ts
vendored
@ -27,13 +27,10 @@ export class System {
|
||||
*/
|
||||
readonly currentTick: number;
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Contains the device information for the server.
|
||||
*
|
||||
* @throws This property can throw when used.
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
readonly serverSystemInfo: SystemInfo;
|
||||
/**
|
||||
|
@ -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
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* IMPORT */ import { MemoryTier } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* Contains device information, like memory tier.
|
||||
*/
|
||||
export class SystemInfo {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* Error thrown when the specified area contains one or more
|
||||
* unloaded chunks.
|
||||
*/
|
||||
|
3
translate-pieces/server/classes/World.d.ts
vendored
3
translate-pieces/server/classes/World.d.ts
vendored
@ -29,9 +29,6 @@ export class World {
|
||||
*
|
||||
*/
|
||||
readonly gameRules: GameRules;
|
||||
/**
|
||||
* @rc
|
||||
*/
|
||||
readonly isHardcore: boolean;
|
||||
/**
|
||||
* @remarks
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { BlockExplodeAfterEventSignal, ButtonPushAfterEventSignal, ChatSendAfterEventSignal, DataDrivenEntityTriggerAfterEventSignal, EffectAddAfterEventSignal, EntityDieAfterEventSignal, EntityHealthChangedAfterEventSignal, EntityHitBlockAfterEventSignal, EntityHitEntityAfterEventSignal, EntityHurtAfterEventSignal, EntityLoadAfterEventSignal, EntityRemoveAfterEventSignal, EntitySpawnAfterEventSignal, ExplosionAfterEventSignal, GameRuleChangeAfterEventSignal, ItemCompleteUseAfterEventSignal, ItemReleaseUseAfterEventSignal, ItemStartUseAfterEventSignal, ItemStartUseOnAfterEventSignal, ItemStopUseAfterEventSignal, ItemStopUseOnAfterEventSignal, ItemUseAfterEventSignal, ItemUseOnAfterEventSignal, LeverActionAfterEventSignal, PistonActivateAfterEventSignal, PlayerBreakBlockAfterEventSignal, PlayerDimensionChangeAfterEventSignal, PlayerEmoteAfterEventSignal, PlayerGameModeChangeAfterEventSignal, PlayerInputModeChangeAfterEventSignal, PlayerInputPermissionCategoryChangeAfterEventSignal, PlayerInteractWithBlockAfterEventSignal, PlayerInteractWithEntityAfterEventSignal, PlayerJoinAfterEventSignal, PlayerLeaveAfterEventSignal, PlayerPlaceBlockAfterEventSignal, PlayerSpawnAfterEventSignal, PressurePlatePopAfterEventSignal, PressurePlatePushAfterEventSignal, ProjectileHitBlockAfterEventSignal, ProjectileHitEntityAfterEventSignal, ServerMessageAfterEventSignal, TargetBlockHitAfterEventSignal, TripWireTripAfterEventSignal, WeatherChangeAfterEventSignal, WorldInitializeAfterEventSignal } from '../index';
|
||||
/* IMPORT */ import { BlockExplodeAfterEventSignal, ButtonPushAfterEventSignal, ChatSendAfterEventSignal, DataDrivenEntityTriggerAfterEventSignal, EffectAddAfterEventSignal, EntityDieAfterEventSignal, EntityHealthChangedAfterEventSignal, EntityHitBlockAfterEventSignal, EntityHitEntityAfterEventSignal, EntityHurtAfterEventSignal, EntityLoadAfterEventSignal, EntityRemoveAfterEventSignal, EntitySpawnAfterEventSignal, ExplosionAfterEventSignal, GameRuleChangeAfterEventSignal, ItemCompleteUseAfterEventSignal, ItemReleaseUseAfterEventSignal, ItemStartUseAfterEventSignal, ItemStartUseOnAfterEventSignal, ItemStopUseAfterEventSignal, ItemStopUseOnAfterEventSignal, ItemUseAfterEventSignal, ItemUseOnAfterEventSignal, LeverActionAfterEventSignal, PistonActivateAfterEventSignal, PlayerBreakBlockAfterEventSignal, PlayerButtonInputAfterEventSignal, PlayerDimensionChangeAfterEventSignal, PlayerEmoteAfterEventSignal, PlayerGameModeChangeAfterEventSignal, PlayerInputModeChangeAfterEventSignal, PlayerInputPermissionCategoryChangeAfterEventSignal, PlayerInteractWithBlockAfterEventSignal, PlayerInteractWithEntityAfterEventSignal, PlayerJoinAfterEventSignal, PlayerLeaveAfterEventSignal, PlayerPlaceBlockAfterEventSignal, PlayerSpawnAfterEventSignal, PressurePlatePopAfterEventSignal, PressurePlatePushAfterEventSignal, ProjectileHitBlockAfterEventSignal, ProjectileHitEntityAfterEventSignal, ServerMessageAfterEventSignal, TargetBlockHitAfterEventSignal, TripWireTripAfterEventSignal, WeatherChangeAfterEventSignal, WorldInitializeAfterEventSignal } from '../index';
|
||||
|
||||
/**
|
||||
* Contains a set of events that are available across the scope
|
||||
@ -190,6 +190,14 @@ export class WorldAfterEvents {
|
||||
*
|
||||
*/
|
||||
readonly playerBreakBlock: PlayerBreakBlockAfterEventSignal;
|
||||
/**
|
||||
* @beta
|
||||
* @remarks
|
||||
* This event fires when an {@link
|
||||
* @minecraft/Server.InputButton} state is changed.
|
||||
*
|
||||
*/
|
||||
readonly playerButtonInput: PlayerButtonInputAfterEventSignal;
|
||||
/**
|
||||
* @remarks
|
||||
* Fires when a player moved to a different dimension.
|
||||
@ -213,14 +221,12 @@ export class WorldAfterEvents {
|
||||
*/
|
||||
readonly playerInputPermissionCategoryChange: PlayerInputPermissionCategoryChangeAfterEventSignal;
|
||||
/**
|
||||
* @rc
|
||||
* @remarks
|
||||
* An event for when a player interacts with a block.
|
||||
*
|
||||
*/
|
||||
readonly playerInteractWithBlock: PlayerInteractWithBlockAfterEventSignal;
|
||||
/**
|
||||
* @rc
|
||||
* @remarks
|
||||
* This event fires when a player interacts with an entity.
|
||||
*
|
||||
|
@ -60,14 +60,12 @@ export class WorldBeforeEvents {
|
||||
readonly playerBreakBlock: PlayerBreakBlockBeforeEventSignal;
|
||||
readonly playerGameModeChange: PlayerGameModeChangeBeforeEventSignal;
|
||||
/**
|
||||
* @rc
|
||||
* @remarks
|
||||
* Fires before a player interacts with a block.
|
||||
*
|
||||
*/
|
||||
readonly playerInteractWithBlock: PlayerInteractWithBlockBeforeEventSignal;
|
||||
/**
|
||||
* @rc
|
||||
* @remarks
|
||||
* Fires before a player interacts with an entity.
|
||||
*
|
||||
|
@ -1,5 +1,4 @@
|
||||
/**
|
||||
* @rc
|
||||
* Description of the resulting intersection test on two
|
||||
* BlockVolume objects
|
||||
*/
|
||||
|
9
translate-pieces/server/enums/ButtonState.d.ts
vendored
Normal file
9
translate-pieces/server/enums/ButtonState.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @beta
|
||||
* The state of a button on a keyboard, controller, or touch
|
||||
* interface.
|
||||
*/
|
||||
export enum ButtonState {
|
||||
Pressed = 'Pressed',
|
||||
Released = 'Released',
|
||||
}
|
@ -19,7 +19,6 @@ export enum EntityComponentTypes {
|
||||
*/
|
||||
Ageable = 'minecraft:ageable',
|
||||
/**
|
||||
* @rc
|
||||
* @remarks
|
||||
* Defines what blocks this entity can breathe in and gives
|
||||
* them the ability to suffocate.
|
||||
|
29
translate-pieces/server/enums/InputButton.d.ts
vendored
Normal file
29
translate-pieces/server/enums/InputButton.d.ts
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @beta
|
||||
* All the different input buttons that are supported. Use with
|
||||
* {@link @minecraft/server.PlayerInput.getButtonState} via
|
||||
* {@link @minecraft/server.Player.input} or {@link
|
||||
* PlayerButtonInputAfterEvent} via {@link
|
||||
* WorldAfterEvents.playerButtonInput}
|
||||
*/
|
||||
export enum InputButton {
|
||||
/**
|
||||
* @remarks
|
||||
* This is mapped to the 'Jump' button on controllers,
|
||||
* keyboards, and touch interfaces.
|
||||
*
|
||||
*/
|
||||
Jump = 'Jump',
|
||||
/**
|
||||
* @remarks
|
||||
* This is mapped to the 'Sneak' button on controllers,
|
||||
* keyboards, and touch interfaces. By default, this is shift
|
||||
* on a keyboard or B on an Xbox controller. On touch
|
||||
* interfaces this will only be pressed for 1 tick or less and
|
||||
* then it will be released immediately even if the player
|
||||
* holds their finger down. Dismounting a horse or exiting a
|
||||
* boat will not send a Sneak button change event.
|
||||
*
|
||||
*/
|
||||
Sneak = 'Sneak',
|
||||
}
|
@ -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.
|
||||
*
|
||||
|
@ -3,6 +3,10 @@
|
||||
* function ItemStack.getComponent.
|
||||
*/
|
||||
export enum ItemComponentTypes {
|
||||
/**
|
||||
* @beta
|
||||
*/
|
||||
Compostable = 'minecraft:compostable',
|
||||
/**
|
||||
* @remarks
|
||||
* The minecraft:cooldown component.
|
||||
|
18
translate-pieces/server/enums/MemoryTier.d.ts
vendored
18
translate-pieces/server/enums/MemoryTier.d.ts
vendored
@ -1,42 +1,36 @@
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* Describes the memory of a device.
|
||||
*/
|
||||
export enum MemoryTier {
|
||||
/**
|
||||
* @remarks
|
||||
* Memory not detected.
|
||||
*
|
||||
*/
|
||||
Undetermined = 0,
|
||||
/**
|
||||
* @remarks
|
||||
* Max memory for Super Low Tier is 1.5GBs.
|
||||
*
|
||||
*/
|
||||
SuperLow = 1,
|
||||
SuperLow = 0,
|
||||
/**
|
||||
* @remarks
|
||||
* Max memory for Low Tier is 2GBs.
|
||||
*
|
||||
*/
|
||||
Low = 2,
|
||||
Low = 1,
|
||||
/**
|
||||
* @remarks
|
||||
* Max memory for Mid Tier is 4GBs.
|
||||
*
|
||||
*/
|
||||
Mid = 3,
|
||||
Mid = 2,
|
||||
/**
|
||||
* @remarks
|
||||
* Max memory for High Tier is 8GBs.
|
||||
*
|
||||
*/
|
||||
High = 4,
|
||||
High = 3,
|
||||
/**
|
||||
* @remarks
|
||||
* Memory for Super High Tier is above 8GBs.
|
||||
*
|
||||
*/
|
||||
SuperHigh = 5,
|
||||
SuperHigh = 4,
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* Describes what kind of platform is a device.
|
||||
*/
|
||||
export enum PlatformType {
|
||||
|
11
translate-pieces/server/index.d.ts
vendored
11
translate-pieces/server/index.d.ts
vendored
@ -5,6 +5,7 @@ import type * as minecraftvanilladata from '../vanilla-data';
|
||||
export { BlockComponentTypes } from './enums/BlockComponentTypes';
|
||||
export { BlockPistonState } from './enums/BlockPistonState';
|
||||
export { BlockVolumeIntersection } from './enums/BlockVolumeIntersection';
|
||||
export { ButtonState } from './enums/ButtonState';
|
||||
export { CompoundBlockVolumeAction } from './enums/CompoundBlockVolumeAction';
|
||||
export { CompoundBlockVolumePositionRelativity } from './enums/CompoundBlockVolumePositionRelativity';
|
||||
export { CustomComponentNameErrorReason } from './enums/CustomComponentNameErrorReason';
|
||||
@ -23,6 +24,7 @@ export { GameMode } from './enums/GameMode';
|
||||
export { GameRule } from './enums/GameRule';
|
||||
export { HudElement } from './enums/HudElement';
|
||||
export { HudVisibility } from './enums/HudVisibility';
|
||||
export { InputButton } from './enums/InputButton';
|
||||
export { InputMode } from './enums/InputMode';
|
||||
export { InputPermissionCategory } from './enums/InputPermissionCategory';
|
||||
export { ItemComponentTypes } from './enums/ItemComponentTypes';
|
||||
@ -43,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';
|
||||
@ -226,6 +228,7 @@ export { ItemComponentMineBlockEvent } from './classes/ItemComponentMineBlockEve
|
||||
export { ItemComponentRegistry } from './classes/ItemComponentRegistry';
|
||||
export { ItemComponentUseEvent } from './classes/ItemComponentUseEvent';
|
||||
export { ItemComponentUseOnEvent } from './classes/ItemComponentUseOnEvent';
|
||||
export { ItemCompostableComponent } from './classes/ItemCompostableComponent';
|
||||
export { ItemCooldownComponent } from './classes/ItemCooldownComponent';
|
||||
export { ItemDurabilityComponent } from './classes/ItemDurabilityComponent';
|
||||
export { ItemDyeableComponent } from './classes/ItemDyeableComponent';
|
||||
@ -267,6 +270,8 @@ export { PlayerBreakBlockAfterEvent } from './classes/PlayerBreakBlockAfterEvent
|
||||
export { PlayerBreakBlockAfterEventSignal } from './classes/PlayerBreakBlockAfterEventSignal';
|
||||
export { PlayerBreakBlockBeforeEvent } from './classes/PlayerBreakBlockBeforeEvent';
|
||||
export { PlayerBreakBlockBeforeEventSignal } from './classes/PlayerBreakBlockBeforeEventSignal';
|
||||
export { PlayerButtonInputAfterEvent } from './classes/PlayerButtonInputAfterEvent';
|
||||
export { PlayerButtonInputAfterEventSignal } from './classes/PlayerButtonInputAfterEventSignal';
|
||||
export { PlayerCursorInventoryComponent } from './classes/PlayerCursorInventoryComponent';
|
||||
export { PlayerDimensionChangeAfterEvent } from './classes/PlayerDimensionChangeAfterEvent';
|
||||
export { PlayerDimensionChangeAfterEventSignal } from './classes/PlayerDimensionChangeAfterEventSignal';
|
||||
@ -323,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';
|
||||
@ -365,6 +372,7 @@ export { CameraSetFacingOptions } from './interfaces/CameraSetFacingOptions';
|
||||
export { CameraSetLocationOptions } from './interfaces/CameraSetLocationOptions';
|
||||
export { CameraSetPosOptions } from './interfaces/CameraSetPosOptions';
|
||||
export { CameraSetRotOptions } from './interfaces/CameraSetRotOptions';
|
||||
export { CameraTargetOptions } from './interfaces/CameraTargetOptions';
|
||||
export { CompoundBlockVolumeItem } from './interfaces/CompoundBlockVolumeItem';
|
||||
export { DefinitionModifier } from './interfaces/DefinitionModifier';
|
||||
export { DimensionLocation } from './interfaces/DimensionLocation';
|
||||
@ -386,6 +394,7 @@ export { EqualsComparison } from './interfaces/EqualsComparison';
|
||||
export { ExplosionOptions } from './interfaces/ExplosionOptions';
|
||||
export { GreaterThanComparison } from './interfaces/GreaterThanComparison';
|
||||
export { GreaterThanOrEqualsComparison } from './interfaces/GreaterThanOrEqualsComparison';
|
||||
export { InputEventOptions } from './interfaces/InputEventOptions';
|
||||
export { ItemCustomComponent } from './interfaces/ItemCustomComponent';
|
||||
export { JigsawPlaceOptions } from './interfaces/JigsawPlaceOptions';
|
||||
export { JigsawStructurePlaceOptions } from './interfaces/JigsawStructurePlaceOptions';
|
||||
|
@ -1,10 +1,24 @@
|
||||
/* IMPORT */ import { BlockFilter } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* Contains additional options for a block fill operation.
|
||||
*/
|
||||
export interface BlockFillOptions {
|
||||
/**
|
||||
* @remarks
|
||||
* When specified, the fill operation will include / exclude
|
||||
* the blocks added to the block filter.
|
||||
*
|
||||
*/
|
||||
blockFilter?: BlockFilter;
|
||||
/**
|
||||
* @remarks
|
||||
* When true fillBlocks will not error if part of the fill
|
||||
* volume is outside of loaded chunks bounds. Instead it will
|
||||
* just fill the blocks that are inside the loaded chunk bounds
|
||||
* and ignoring blocks outside.
|
||||
*
|
||||
*/
|
||||
ignoreChunkBoundErrors?: boolean;
|
||||
}
|
@ -1,8 +1,13 @@
|
||||
/* IMPORT */ import { Vector2 } from '../index';
|
||||
/* IMPORT */ import { Vector2, Vector3 } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
*
|
||||
* Required Experiments:
|
||||
* - Third Person Cameras
|
||||
*
|
||||
*/
|
||||
export interface CameraFixedBoomOptions {
|
||||
entityOffset?: Vector3;
|
||||
viewOffset?: Vector2;
|
||||
}
|
13
translate-pieces/server/interfaces/CameraTargetOptions.d.ts
vendored
Normal file
13
translate-pieces/server/interfaces/CameraTargetOptions.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/* IMPORT */ import { Entity, Vector3 } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
*
|
||||
* Required Experiments:
|
||||
* - Focus Target Camera
|
||||
*
|
||||
*/
|
||||
export interface CameraTargetOptions {
|
||||
offsetFromTargetCenter?: Vector3;
|
||||
targetEntity: Entity;
|
||||
}
|
25
translate-pieces/server/interfaces/InputEventOptions.d.ts
vendored
Normal file
25
translate-pieces/server/interfaces/InputEventOptions.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
/* IMPORT */ import { ButtonState, InputButton } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* An interface that is passed into {@link
|
||||
* @minecraft/Server.PlayerButtonInputAfterEventSignal.subscribe}
|
||||
* that filters out which events are passed to the provided
|
||||
* callback.
|
||||
*/
|
||||
export interface InputEventOptions {
|
||||
/**
|
||||
* @remarks
|
||||
* The buttons the callback should be called for. If undefined,
|
||||
* the callback will be called for all buttons.
|
||||
*
|
||||
*/
|
||||
buttons?: InputButton[];
|
||||
/**
|
||||
* @remarks
|
||||
* The state the callback should be called for. If undefined,
|
||||
* the callback will be called for all button states.
|
||||
*
|
||||
*/
|
||||
state?: ButtonState;
|
||||
}
|
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"
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
|
@ -1,14 +1,16 @@
|
||||
/* IMPORT */ import { ItemCooldownComponent, ItemDurabilityComponent, ItemDyeableComponent, ItemEnchantableComponent, ItemFoodComponent, ItemPotionComponent } from '../index';
|
||||
/* IMPORT */ import { ItemCompostableComponent, ItemCooldownComponent, ItemDurabilityComponent, ItemDyeableComponent, ItemEnchantableComponent, ItemFoodComponent, ItemPotionComponent } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
*/
|
||||
export type ItemComponentTypeMap = {
|
||||
compostable: ItemCompostableComponent;
|
||||
cooldown: ItemCooldownComponent;
|
||||
durability: ItemDurabilityComponent;
|
||||
dyeable: ItemDyeableComponent;
|
||||
enchantable: ItemEnchantableComponent;
|
||||
food: ItemFoodComponent;
|
||||
'minecraft:compostable': ItemCompostableComponent;
|
||||
'minecraft:cooldown': ItemCooldownComponent;
|
||||
'minecraft:durability': ItemDurabilityComponent;
|
||||
'minecraft:dyeable': ItemDyeableComponent;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user