@minecraft/server 2.3.0-rc.1.21.120-preview.21 → 2.3.0-rc.1.21.120-preview.23
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 +168 -5
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -3124,6 +3124,23 @@ export class Block {
|
|
|
3124
3124
|
* {@link LocationOutOfWorldBoundariesError}
|
|
3125
3125
|
*/
|
|
3126
3126
|
getItemStack(amount?: number, withData?: boolean): ItemStack | undefined;
|
|
3127
|
+
/**
|
|
3128
|
+
* @rc
|
|
3129
|
+
* @remarks
|
|
3130
|
+
* Returns the total brightness level of light shining on a
|
|
3131
|
+
* certain block.
|
|
3132
|
+
*
|
|
3133
|
+
* This function can't be called in read-only mode.
|
|
3134
|
+
*
|
|
3135
|
+
* @returns
|
|
3136
|
+
* The brightness level on the block.
|
|
3137
|
+
* @throws This function can throw errors.
|
|
3138
|
+
*
|
|
3139
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
3140
|
+
*
|
|
3141
|
+
* {@link LocationInUnloadedChunkError}
|
|
3142
|
+
*/
|
|
3143
|
+
getLightLevel(): number;
|
|
3127
3144
|
/**
|
|
3128
3145
|
* @remarks
|
|
3129
3146
|
* Returns the net redstone power of this block.
|
|
@@ -3138,6 +3155,23 @@ export class Block {
|
|
|
3138
3155
|
* {@link LocationOutOfWorldBoundariesError}
|
|
3139
3156
|
*/
|
|
3140
3157
|
getRedstonePower(): number | undefined;
|
|
3158
|
+
/**
|
|
3159
|
+
* @rc
|
|
3160
|
+
* @remarks
|
|
3161
|
+
* Returns the brightness level of light shining from the sky
|
|
3162
|
+
* on a certain block.
|
|
3163
|
+
*
|
|
3164
|
+
* This function can't be called in read-only mode.
|
|
3165
|
+
*
|
|
3166
|
+
* @returns
|
|
3167
|
+
* The brightness level on the block.
|
|
3168
|
+
* @throws This function can throw errors.
|
|
3169
|
+
*
|
|
3170
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
3171
|
+
*
|
|
3172
|
+
* {@link LocationInUnloadedChunkError}
|
|
3173
|
+
*/
|
|
3174
|
+
getSkyLightLevel(): number;
|
|
3141
3175
|
/**
|
|
3142
3176
|
* @remarks
|
|
3143
3177
|
* Returns a set of tags for a block.
|
|
@@ -5598,6 +5632,24 @@ export class ContainerSlot {
|
|
|
5598
5632
|
* {@link InvalidContainerSlotError}
|
|
5599
5633
|
*/
|
|
5600
5634
|
setCanPlaceOn(blockIdentifiers?: string[]): void;
|
|
5635
|
+
/**
|
|
5636
|
+
* @rc
|
|
5637
|
+
* @remarks
|
|
5638
|
+
* Sets multiple dynamic properties with specific values.
|
|
5639
|
+
*
|
|
5640
|
+
* @param values
|
|
5641
|
+
* A Record of key value pairs of the dynamic properties to
|
|
5642
|
+
* set. If the data value is null, it will remove that property
|
|
5643
|
+
* instead.
|
|
5644
|
+
* @throws This function can throw errors.
|
|
5645
|
+
*
|
|
5646
|
+
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
5647
|
+
*
|
|
5648
|
+
* {@link InvalidContainerSlotError}
|
|
5649
|
+
*
|
|
5650
|
+
* {@link minecraftcommon.UnsupportedFunctionalityError}
|
|
5651
|
+
*/
|
|
5652
|
+
setDynamicProperties(values: Record<string, boolean | number | string | Vector3 | undefined>): void;
|
|
5601
5653
|
/**
|
|
5602
5654
|
* @remarks
|
|
5603
5655
|
* Sets a specified property to a value.
|
|
@@ -5605,7 +5657,8 @@ export class ContainerSlot {
|
|
|
5605
5657
|
* @param identifier
|
|
5606
5658
|
* The property identifier.
|
|
5607
5659
|
* @param value
|
|
5608
|
-
* Data value of the property to set.
|
|
5660
|
+
* Data value of the property to set. If the value is null, it
|
|
5661
|
+
* will remove the property instead.
|
|
5609
5662
|
* @throws
|
|
5610
5663
|
* Throws if the slot's container is invalid.
|
|
5611
5664
|
*
|
|
@@ -6174,6 +6227,23 @@ export class Dimension {
|
|
|
6174
6227
|
* {@link minecraftcommon.UnsupportedFunctionalityError}
|
|
6175
6228
|
*/
|
|
6176
6229
|
getEntitiesFromRay(location: Vector3, direction: Vector3, options?: EntityRaycastOptions): EntityRaycastHit[];
|
|
6230
|
+
/**
|
|
6231
|
+
* @rc
|
|
6232
|
+
* @remarks
|
|
6233
|
+
* Returns the total brightness level of light shining on a
|
|
6234
|
+
* certain block position.
|
|
6235
|
+
*
|
|
6236
|
+
* @param location
|
|
6237
|
+
* Location of the block we want to check the brightness of.
|
|
6238
|
+
* @returns
|
|
6239
|
+
* The brightness level on the block.
|
|
6240
|
+
* @throws This function can throw errors.
|
|
6241
|
+
*
|
|
6242
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
6243
|
+
*
|
|
6244
|
+
* {@link LocationInUnloadedChunkError}
|
|
6245
|
+
*/
|
|
6246
|
+
getLightLevel(location: Vector3): number;
|
|
6177
6247
|
/**
|
|
6178
6248
|
* @remarks
|
|
6179
6249
|
* Returns a set of players based on a set of conditions
|
|
@@ -6191,6 +6261,23 @@ export class Dimension {
|
|
|
6191
6261
|
* {@link minecraftcommon.InvalidArgumentError}
|
|
6192
6262
|
*/
|
|
6193
6263
|
getPlayers(options?: EntityQueryOptions): Player[];
|
|
6264
|
+
/**
|
|
6265
|
+
* @rc
|
|
6266
|
+
* @remarks
|
|
6267
|
+
* Returns the brightness level of light shining from the sky
|
|
6268
|
+
* on a certain block position.
|
|
6269
|
+
*
|
|
6270
|
+
* @param location
|
|
6271
|
+
* Position of the block we want to check the brightness of.
|
|
6272
|
+
* @returns
|
|
6273
|
+
* The brightness level on the block.
|
|
6274
|
+
* @throws This function can throw errors.
|
|
6275
|
+
*
|
|
6276
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
6277
|
+
*
|
|
6278
|
+
* {@link LocationInUnloadedChunkError}
|
|
6279
|
+
*/
|
|
6280
|
+
getSkyLightLevel(location: Vector3): number;
|
|
6194
6281
|
/**
|
|
6195
6282
|
* @remarks
|
|
6196
6283
|
* Returns the highest block at the given XZ location.
|
|
@@ -6203,6 +6290,16 @@ export class Dimension {
|
|
|
6203
6290
|
* @throws This function can throw errors.
|
|
6204
6291
|
*/
|
|
6205
6292
|
getTopmostBlock(locationXZ: VectorXZ, minHeight?: number): Block | undefined;
|
|
6293
|
+
/**
|
|
6294
|
+
* @rc
|
|
6295
|
+
* @remarks
|
|
6296
|
+
* Returns true if the chunk at the given location is loaded
|
|
6297
|
+
* (and valid for use with scripting).
|
|
6298
|
+
*
|
|
6299
|
+
* @param location
|
|
6300
|
+
* Location to check if the chunk is loaded.
|
|
6301
|
+
*/
|
|
6302
|
+
isChunkLoaded(location: Vector3): boolean;
|
|
6206
6303
|
/**
|
|
6207
6304
|
* @remarks
|
|
6208
6305
|
* Places the given feature into the dimension at the specified
|
|
@@ -7735,6 +7832,22 @@ export class Entity {
|
|
|
7735
7832
|
* {@link InvalidEntityError}
|
|
7736
7833
|
*/
|
|
7737
7834
|
runCommand(commandString: string): CommandResult;
|
|
7835
|
+
/**
|
|
7836
|
+
* @rc
|
|
7837
|
+
* @remarks
|
|
7838
|
+
* Sets multiple dynamic properties with specific values.
|
|
7839
|
+
*
|
|
7840
|
+
* @param values
|
|
7841
|
+
* A Record of key value pairs of the dynamic properties to
|
|
7842
|
+
* set. If the data value is null, it will remove that property
|
|
7843
|
+
* instead.
|
|
7844
|
+
* @throws This function can throw errors.
|
|
7845
|
+
*
|
|
7846
|
+
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
7847
|
+
*
|
|
7848
|
+
* {@link InvalidEntityError}
|
|
7849
|
+
*/
|
|
7850
|
+
setDynamicProperties(values: Record<string, boolean | number | string | Vector3 | undefined>): void;
|
|
7738
7851
|
/**
|
|
7739
7852
|
* @remarks
|
|
7740
7853
|
* Sets a specified property to a value.
|
|
@@ -7742,7 +7855,8 @@ export class Entity {
|
|
|
7742
7855
|
* @param identifier
|
|
7743
7856
|
* The property identifier.
|
|
7744
7857
|
* @param value
|
|
7745
|
-
* Data value of the property to set.
|
|
7858
|
+
* Data value of the property to set. If the value is null, it
|
|
7859
|
+
* will remove the property instead.
|
|
7746
7860
|
* @throws This function can throw errors.
|
|
7747
7861
|
*
|
|
7748
7862
|
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
@@ -12408,6 +12522,22 @@ export class ItemStack {
|
|
|
12408
12522
|
* ```
|
|
12409
12523
|
*/
|
|
12410
12524
|
setCanPlaceOn(blockIdentifiers?: string[]): void;
|
|
12525
|
+
/**
|
|
12526
|
+
* @rc
|
|
12527
|
+
* @remarks
|
|
12528
|
+
* Sets multiple dynamic properties with specific values.
|
|
12529
|
+
*
|
|
12530
|
+
* @param values
|
|
12531
|
+
* A Record of key value pairs of the dynamic properties to
|
|
12532
|
+
* set. If the data value is null, it will remove that property
|
|
12533
|
+
* instead.
|
|
12534
|
+
* @throws This function can throw errors.
|
|
12535
|
+
*
|
|
12536
|
+
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
12537
|
+
*
|
|
12538
|
+
* {@link minecraftcommon.UnsupportedFunctionalityError}
|
|
12539
|
+
*/
|
|
12540
|
+
setDynamicProperties(values: Record<string, boolean | number | string | Vector3 | undefined>): void;
|
|
12411
12541
|
/**
|
|
12412
12542
|
* @remarks
|
|
12413
12543
|
* Sets a specified property to a value. Note: This function
|
|
@@ -12416,7 +12546,8 @@ export class ItemStack {
|
|
|
12416
12546
|
* @param identifier
|
|
12417
12547
|
* The property identifier.
|
|
12418
12548
|
* @param value
|
|
12419
|
-
* Data value of the property to set.
|
|
12549
|
+
* Data value of the property to set. If the value is null, it
|
|
12550
|
+
* will remove the property instead.
|
|
12420
12551
|
* @throws
|
|
12421
12552
|
* Throws if the item stack is stackable.
|
|
12422
12553
|
*
|
|
@@ -13470,7 +13601,7 @@ export class Player extends Entity {
|
|
|
13470
13601
|
* The Entity whose Entity Property overrides are being
|
|
13471
13602
|
* cleared.
|
|
13472
13603
|
* @throws
|
|
13473
|
-
* Throws if the
|
|
13604
|
+
* Throws if the Entity is invalid.
|
|
13474
13605
|
*/
|
|
13475
13606
|
clearPropertyOverridesForEntity(targetEntity: Entity): void;
|
|
13476
13607
|
/**
|
|
@@ -17479,6 +17610,20 @@ export class World {
|
|
|
17479
17610
|
* The difficulty we want to set the world to.
|
|
17480
17611
|
*/
|
|
17481
17612
|
setDifficulty(difficulty: Difficulty): void;
|
|
17613
|
+
/**
|
|
17614
|
+
* @rc
|
|
17615
|
+
* @remarks
|
|
17616
|
+
* Sets multiple dynamic properties with specific values.
|
|
17617
|
+
*
|
|
17618
|
+
* @param values
|
|
17619
|
+
* A Record of key value pairs of the dynamic properties to
|
|
17620
|
+
* set. If the data value is null, it will remove that property
|
|
17621
|
+
* instead.
|
|
17622
|
+
* @throws This function can throw errors.
|
|
17623
|
+
*
|
|
17624
|
+
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
17625
|
+
*/
|
|
17626
|
+
setDynamicProperties(values: Record<string, boolean | number | string | Vector3 | undefined>): void;
|
|
17482
17627
|
/**
|
|
17483
17628
|
* @remarks
|
|
17484
17629
|
* Sets a specified property to a value.
|
|
@@ -17486,7 +17631,8 @@ export class World {
|
|
|
17486
17631
|
* @param identifier
|
|
17487
17632
|
* The property identifier.
|
|
17488
17633
|
* @param value
|
|
17489
|
-
* Data value of the property to set.
|
|
17634
|
+
* Data value of the property to set. If the value is null, it
|
|
17635
|
+
* will remove the property instead.
|
|
17490
17636
|
* @throws
|
|
17491
17637
|
* Throws if the given dynamic property identifier is not
|
|
17492
17638
|
* defined.
|
|
@@ -19941,6 +20087,23 @@ export interface ScriptEventMessageFilterOptions {
|
|
|
19941
20087
|
* Contains additional options for spawning an Entity.
|
|
19942
20088
|
*/
|
|
19943
20089
|
export interface SpawnEntityOptions {
|
|
20090
|
+
/**
|
|
20091
|
+
* @rc
|
|
20092
|
+
* @remarks
|
|
20093
|
+
* Optional boolean which determines if this entity should
|
|
20094
|
+
* persist in the game world. Persistence prevents the entity
|
|
20095
|
+
* from automatically despawning.
|
|
20096
|
+
*
|
|
20097
|
+
*/
|
|
20098
|
+
initialPersistence?: boolean;
|
|
20099
|
+
/**
|
|
20100
|
+
* @rc
|
|
20101
|
+
* @remarks
|
|
20102
|
+
* Optional initial rotation, in degrees, to set on the entity
|
|
20103
|
+
* when it spawns.
|
|
20104
|
+
*
|
|
20105
|
+
*/
|
|
20106
|
+
initialRotation?: number;
|
|
19944
20107
|
/**
|
|
19945
20108
|
* @remarks
|
|
19946
20109
|
* Optional spawn event to send to the entity after it is
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server",
|
|
3
|
-
"version": "2.3.0-rc.1.21.120-preview.
|
|
3
|
+
"version": "2.3.0-rc.1.21.120-preview.23",
|
|
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.21.120-preview.
|
|
17
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.21.120-preview.23"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|