@minecraft/server 2.8.0-beta.1.26.20-preview.23 → 2.8.0-beta.1.26.20-preview.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +97 -4
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -8956,26 +8956,67 @@ export class Dimension {
|
|
|
8956
8956
|
}
|
|
8957
8957
|
|
|
8958
8958
|
/**
|
|
8959
|
-
*
|
|
8959
|
+
* @beta
|
|
8960
|
+
* Provides the functionality for registering custom
|
|
8961
|
+
* dimensions. Custom dimensions can only be registered during
|
|
8962
|
+
* the system startup event.
|
|
8963
|
+
*/
|
|
8964
|
+
export class DimensionRegistry {
|
|
8965
|
+
private constructor();
|
|
8966
|
+
/**
|
|
8967
|
+
* @remarks
|
|
8968
|
+
* Registers a new custom dimension type. Must be called during
|
|
8969
|
+
* the system startup event. The dimension will be created
|
|
8970
|
+
* using the void generator.
|
|
8971
|
+
*
|
|
8972
|
+
* This function can be called in early-execution mode.
|
|
8973
|
+
*
|
|
8974
|
+
* @param typeId
|
|
8975
|
+
* The namespaced identifier for the custom dimension (e.g.,
|
|
8976
|
+
* 'mypack:my_dimension'). Must include a namespace and use
|
|
8977
|
+
* only valid identifier characters.
|
|
8978
|
+
* @throws This function can throw errors.
|
|
8979
|
+
*
|
|
8980
|
+
* {@link CustomDimensionAlreadyRegisteredError}
|
|
8981
|
+
*
|
|
8982
|
+
* {@link CustomDimensionInvalidRegistryError}
|
|
8983
|
+
*
|
|
8984
|
+
* {@link CustomDimensionNameError}
|
|
8985
|
+
*
|
|
8986
|
+
* {@link CustomDimensionReloadNewDimensionError}
|
|
8987
|
+
*
|
|
8988
|
+
* {@link minecraftcommon.EngineError}
|
|
8989
|
+
*
|
|
8990
|
+
* {@link NamespaceNameError}
|
|
8991
|
+
*/
|
|
8992
|
+
registerCustomDimension(typeId: string): void;
|
|
8993
|
+
}
|
|
8994
|
+
|
|
8995
|
+
/**
|
|
8996
|
+
* Represents a type of dimension. Currently only works with
|
|
8997
|
+
* Vanilla dimensions.
|
|
8960
8998
|
*/
|
|
8961
8999
|
export class DimensionType {
|
|
8962
9000
|
private constructor();
|
|
8963
9001
|
/**
|
|
8964
9002
|
* @remarks
|
|
8965
|
-
* Identifier of the dimension type.
|
|
9003
|
+
* Identifier of the dimension type. Currently only works with
|
|
9004
|
+
* Vanilla dimensions.
|
|
8966
9005
|
*
|
|
8967
9006
|
*/
|
|
8968
9007
|
readonly typeId: string;
|
|
8969
9008
|
}
|
|
8970
9009
|
|
|
8971
9010
|
/**
|
|
8972
|
-
* Used for accessing all available dimension types.
|
|
9011
|
+
* Used for accessing all available dimension types. Currently
|
|
9012
|
+
* only works with Vanilla dimensions.
|
|
8973
9013
|
*/
|
|
8974
9014
|
export class DimensionTypes {
|
|
8975
9015
|
private constructor();
|
|
8976
9016
|
/**
|
|
8977
9017
|
* @remarks
|
|
8978
9018
|
* Retrieves a dimension type using a string-based identifier.
|
|
9019
|
+
* Currently only works with Vanilla dimensions.
|
|
8979
9020
|
*
|
|
8980
9021
|
* This function can be called in early-execution mode.
|
|
8981
9022
|
*
|
|
@@ -8983,7 +9024,8 @@ export class DimensionTypes {
|
|
|
8983
9024
|
static get(dimensionTypeId: string): DimensionType | undefined;
|
|
8984
9025
|
/**
|
|
8985
9026
|
* @remarks
|
|
8986
|
-
* Retrieves an array of all dimension types.
|
|
9027
|
+
* Retrieves an array of all dimension types. Currently only
|
|
9028
|
+
* works with Vanilla dimensions.
|
|
8987
9029
|
*
|
|
8988
9030
|
* This function can be called in early-execution mode.
|
|
8989
9031
|
*
|
|
@@ -21289,6 +21331,13 @@ export class StartupEvent {
|
|
|
21289
21331
|
*
|
|
21290
21332
|
*/
|
|
21291
21333
|
readonly customCommandRegistry: CustomCommandRegistry;
|
|
21334
|
+
/**
|
|
21335
|
+
* @beta
|
|
21336
|
+
* @remarks
|
|
21337
|
+
* This property can be read in early-execution mode.
|
|
21338
|
+
*
|
|
21339
|
+
*/
|
|
21340
|
+
readonly dimensionRegistry: DimensionRegistry;
|
|
21292
21341
|
/**
|
|
21293
21342
|
* @remarks
|
|
21294
21343
|
* This property can be read in early-execution mode.
|
|
@@ -22097,6 +22146,8 @@ export class TextPrimitive extends PrimitiveShape {
|
|
|
22097
22146
|
*
|
|
22098
22147
|
* @throws This function can throw errors.
|
|
22099
22148
|
*
|
|
22149
|
+
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
22150
|
+
*
|
|
22100
22151
|
* {@link RawMessageError}
|
|
22101
22152
|
*/
|
|
22102
22153
|
setText(text: RawMessage | string): void;
|
|
@@ -26909,6 +26960,48 @@ export class CustomComponentNameError extends Error {
|
|
|
26909
26960
|
readonly reason: CustomComponentNameErrorReason;
|
|
26910
26961
|
}
|
|
26911
26962
|
|
|
26963
|
+
/**
|
|
26964
|
+
* @beta
|
|
26965
|
+
* Thrown when trying to register a custom dimension with a
|
|
26966
|
+
* name that has already been registered.
|
|
26967
|
+
*/
|
|
26968
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
26969
|
+
export class CustomDimensionAlreadyRegisteredError extends Error {
|
|
26970
|
+
private constructor();
|
|
26971
|
+
}
|
|
26972
|
+
|
|
26973
|
+
/**
|
|
26974
|
+
* @beta
|
|
26975
|
+
* Thrown when trying to register a custom dimension outside of
|
|
26976
|
+
* the system startup event.
|
|
26977
|
+
*/
|
|
26978
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
26979
|
+
export class CustomDimensionInvalidRegistryError extends Error {
|
|
26980
|
+
private constructor();
|
|
26981
|
+
}
|
|
26982
|
+
|
|
26983
|
+
/**
|
|
26984
|
+
* @beta
|
|
26985
|
+
* Thrown when trying to register a custom dimension with a
|
|
26986
|
+
* name that contains invalid characters.
|
|
26987
|
+
*/
|
|
26988
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
26989
|
+
export class CustomDimensionNameError extends Error {
|
|
26990
|
+
private constructor();
|
|
26991
|
+
}
|
|
26992
|
+
|
|
26993
|
+
/**
|
|
26994
|
+
* @beta
|
|
26995
|
+
* Thrown after using the /reload command when trying to
|
|
26996
|
+
* register a custom dimension that was not previously
|
|
26997
|
+
* registered. New custom dimensions cannot be added during a
|
|
26998
|
+
* reload.
|
|
26999
|
+
*/
|
|
27000
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
27001
|
+
export class CustomDimensionReloadNewDimensionError extends Error {
|
|
27002
|
+
private constructor();
|
|
27003
|
+
}
|
|
27004
|
+
|
|
26912
27005
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
26913
27006
|
export class EnchantmentLevelOutOfBoundsError extends Error {
|
|
26914
27007
|
private constructor();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server",
|
|
3
|
-
"version": "2.8.0-beta.1.26.20-preview.
|
|
3
|
+
"version": "2.8.0-beta.1.26.20-preview.26",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@minecraft/common": "^1.2.0",
|
|
17
|
-
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.20-preview.
|
|
17
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.20-preview.26"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|