@minecraft/server 1.1.0-beta.1.19.70-preview.22 → 1.1.0-beta.1.19.70-preview.24
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 +374 -1051
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* ```json
|
|
17
17
|
* {
|
|
18
18
|
* "module_name": "@minecraft/server",
|
|
19
|
-
* "version": "1.1.0-internal.1.19.70-preview.
|
|
19
|
+
* "version": "1.1.0-internal.1.19.70-preview.24"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -996,117 +996,17 @@ export class BlockInventoryComponent extends BlockComponent {
|
|
|
996
996
|
*/
|
|
997
997
|
static readonly componentId = 'minecraft:inventory';
|
|
998
998
|
}
|
|
999
|
-
/**
|
|
1000
|
-
* @beta
|
|
1001
|
-
* Represents the inventory of a {@link Block} in the world.
|
|
1002
|
-
* Used with blocks like chests.
|
|
1003
|
-
*/
|
|
1004
999
|
export class BlockInventoryComponentContainer extends Container {
|
|
1005
1000
|
protected constructor();
|
|
1006
|
-
/**
|
|
1007
|
-
* Contains a count of the slots in the container that are
|
|
1008
|
-
* empty.
|
|
1009
|
-
* @throws This property can throw when used.
|
|
1010
|
-
*/
|
|
1011
1001
|
readonly emptySlotsCount: number;
|
|
1012
|
-
/**
|
|
1013
|
-
* Returns the size capacity of the inventory container on this
|
|
1014
|
-
* block.
|
|
1015
|
-
* @throws This property can throw when used.
|
|
1016
|
-
*/
|
|
1017
1002
|
readonly size: number;
|
|
1018
|
-
/**
|
|
1019
|
-
* @remarks
|
|
1020
|
-
* Adds an item to the specified container. Item will be placed
|
|
1021
|
-
* in the first available empty slot. (use .setItem if you wish
|
|
1022
|
-
* to set items in a particular slot.)
|
|
1023
|
-
* @param itemStack
|
|
1024
|
-
* The stack of items to add.
|
|
1025
|
-
* @throws This function can throw errors.
|
|
1026
|
-
*/
|
|
1027
1003
|
addItem(itemStack: ItemStack): void;
|
|
1028
|
-
/**
|
|
1029
|
-
* @remarks
|
|
1030
|
-
* Clears the entirety of the inventory of this block (i.e.,
|
|
1031
|
-
* chest)
|
|
1032
|
-
* @throws This function can throw errors.
|
|
1033
|
-
*/
|
|
1034
1004
|
clearAll(): void;
|
|
1035
|
-
/**
|
|
1036
|
-
* @remarks
|
|
1037
|
-
* Clears a specific item within the chest.
|
|
1038
|
-
* @param slot
|
|
1039
|
-
* @throws This function can throw errors.
|
|
1040
|
-
*/
|
|
1041
1005
|
clearItem(slot: number): void;
|
|
1042
|
-
/**
|
|
1043
|
-
* @remarks
|
|
1044
|
-
* Gets the item stack for the set of items at the specified
|
|
1045
|
-
* slot. If the slot is empty, returns undefined. This method
|
|
1046
|
-
* does not change or clear the contents of the specified slot.
|
|
1047
|
-
* @param slot
|
|
1048
|
-
* Zero-based index of the slot to retrieve items from.
|
|
1049
|
-
* @throws This function can throw errors.
|
|
1050
|
-
* @example getItem.js
|
|
1051
|
-
* ```typescript
|
|
1052
|
-
* const itemStack = rightChestContainer.getItem(0);
|
|
1053
|
-
* test.assert(itemStack.id === "apple", "Expected apple");
|
|
1054
|
-
* test.assert(itemStack.amount === 10, "Expected 10 apples");
|
|
1055
|
-
* ```
|
|
1056
|
-
*/
|
|
1057
1006
|
getItem(slot: number): ItemStack;
|
|
1058
|
-
/**
|
|
1059
|
-
* @remarks
|
|
1060
|
-
* Gets a container slot within the chest.
|
|
1061
|
-
* @param slot
|
|
1062
|
-
* @throws This function can throw errors.
|
|
1063
|
-
*/
|
|
1064
1007
|
getSlot(slot: number): ContainerSlot;
|
|
1065
|
-
/**
|
|
1066
|
-
* @remarks
|
|
1067
|
-
* Sets an item stack within a particular slot.
|
|
1068
|
-
* @param slot
|
|
1069
|
-
* Zero-based index of the slot to set an item at.
|
|
1070
|
-
* @param itemStack
|
|
1071
|
-
* Stack of items to place within the specified slot.
|
|
1072
|
-
* @throws This function can throw errors.
|
|
1073
|
-
*/
|
|
1074
1008
|
setItem(slot: number, itemStack?: ItemStack): void;
|
|
1075
|
-
/**
|
|
1076
|
-
* @remarks
|
|
1077
|
-
* Swaps items between two different slots within containers.
|
|
1078
|
-
* @param slot
|
|
1079
|
-
* Zero-based index of the slot to swap from this container.
|
|
1080
|
-
* @param otherSlot
|
|
1081
|
-
* Zero-based index of the slot to swap with.
|
|
1082
|
-
* @param otherContainer
|
|
1083
|
-
* Target container to swap with. Note this can be the same
|
|
1084
|
-
* container as this source.
|
|
1085
|
-
* @throws This function can throw errors.
|
|
1086
|
-
* @example swapItems.js
|
|
1087
|
-
* ```typescript
|
|
1088
|
-
* rightChestContainer.swapItems(1, 0, leftChestContainer); // swap item in slot 1 of rightChestContainer with item in slot 0 of leftChestContainer
|
|
1089
|
-
*
|
|
1090
|
-
* ```
|
|
1091
|
-
*/
|
|
1092
1009
|
swapItems(slot: number, otherSlot: number, otherContainer: Container): boolean;
|
|
1093
|
-
/**
|
|
1094
|
-
* @remarks
|
|
1095
|
-
* Moves an item from one slot to another, potentially across
|
|
1096
|
-
* containers.
|
|
1097
|
-
* @param fromSlot
|
|
1098
|
-
* @param toSlot
|
|
1099
|
-
* Zero-based index of the slot to move to.
|
|
1100
|
-
* @param toContainer
|
|
1101
|
-
* Target container to transfer to. Note this can be the same
|
|
1102
|
-
* container as the source.
|
|
1103
|
-
* @throws This function can throw errors.
|
|
1104
|
-
* @example transferItem.js
|
|
1105
|
-
* ```typescript
|
|
1106
|
-
* rightChestContainer.transferItem(0, 4, chestCartContainer); // transfer the apple from the right chest to a chest cart
|
|
1107
|
-
*
|
|
1108
|
-
* ```
|
|
1109
|
-
*/
|
|
1110
1010
|
transferItem(fromSlot: number, toSlot: number, toContainer: Container): boolean;
|
|
1111
1011
|
}
|
|
1112
1012
|
/**
|
|
@@ -1160,16 +1060,15 @@ export class BlockPermutation {
|
|
|
1160
1060
|
* Returns the list of all of the properties that the
|
|
1161
1061
|
* permutation has.
|
|
1162
1062
|
*/
|
|
1163
|
-
getAllProperties():
|
|
1063
|
+
getAllProperties(): Record<string, boolean | number | string>;
|
|
1164
1064
|
/**
|
|
1165
1065
|
* @remarks
|
|
1166
1066
|
* Gets a property for the permutation.
|
|
1167
1067
|
* @param propertyName
|
|
1168
1068
|
* @returns
|
|
1169
1069
|
* Returns the property if the permutation has it, else `null`.
|
|
1170
|
-
* @throws This function can throw errors.
|
|
1171
1070
|
*/
|
|
1172
|
-
getProperty(propertyName: string):
|
|
1071
|
+
getProperty(propertyName: string): boolean | number | string | undefined;
|
|
1173
1072
|
/**
|
|
1174
1073
|
* @remarks
|
|
1175
1074
|
* Creates a copy of the permutation.
|
|
@@ -1196,6 +1095,9 @@ export class BlockPermutation {
|
|
|
1196
1095
|
* ```
|
|
1197
1096
|
*/
|
|
1198
1097
|
hasTag(tag: string): boolean;
|
|
1098
|
+
matches(blockName: string, properties?: Record<string, boolean | number | string>): boolean;
|
|
1099
|
+
withProperty(name: string, value: boolean | number | string): BlockPermutation;
|
|
1100
|
+
static resolve(blockName: string, properties?: Record<string, boolean | number | string>): BlockPermutation;
|
|
1199
1101
|
}
|
|
1200
1102
|
/**
|
|
1201
1103
|
* @beta
|
|
@@ -1324,603 +1226,13 @@ export class BlockPotionContainerComponent extends BlockComponent {
|
|
|
1324
1226
|
// tslint:disable-next-line:no-unnecessary-class
|
|
1325
1227
|
export class BlockProperties {
|
|
1326
1228
|
protected constructor();
|
|
1327
|
-
static
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
* Boolean property that determines if saplings should grow.
|
|
1335
|
-
*/
|
|
1336
|
-
static readonly ageBit = 'age_bit';
|
|
1337
|
-
/**
|
|
1338
|
-
* Boolean property that determines if an explosion propagates
|
|
1339
|
-
* underwater.
|
|
1340
|
-
*/
|
|
1341
|
-
static readonly allowUnderwaterBit = 'allow_underwater_bit';
|
|
1342
|
-
/**
|
|
1343
|
-
* Boolean property that determines if a tripwire is attached
|
|
1344
|
-
* to another tripwire.
|
|
1345
|
-
*/
|
|
1346
|
-
static readonly attachedBit = 'attached_bit';
|
|
1347
|
-
/**
|
|
1348
|
-
* String property that represents the type of attachment used
|
|
1349
|
-
* by a bell or grindstone block. Valid values are 'standing',
|
|
1350
|
-
* 'hanging', 'side' and 'multiple'.
|
|
1351
|
-
*/
|
|
1352
|
-
static readonly attachment = 'attachment';
|
|
1353
|
-
/**
|
|
1354
|
-
* String property that determines the thickness of a bamboo
|
|
1355
|
-
* stalk. Valid values are 'thin' and 'thick'.
|
|
1356
|
-
*/
|
|
1357
|
-
static readonly bambooLeafSize = 'bamboo_leaf_size';
|
|
1358
|
-
/**
|
|
1359
|
-
* String property that determines the size of bamboo leaves.
|
|
1360
|
-
* Valid values are 'no_leaves', 'small_leaves', and
|
|
1361
|
-
* 'large_leaves'.
|
|
1362
|
-
*/
|
|
1363
|
-
static readonly bambooStalkThickness = 'bamboo_stalk_thickness';
|
|
1364
|
-
static readonly bigDripleafHead = 'big_dripleaf_head';
|
|
1365
|
-
/**
|
|
1366
|
-
* String property that represents the tilt state of big
|
|
1367
|
-
* dripleaf block. Valid values are 'none', 'unstable',
|
|
1368
|
-
* 'partial_tilt' and 'full_tilt'.
|
|
1369
|
-
*/
|
|
1370
|
-
static readonly bigDripleafTilt = 'big_dripleaf_tilt';
|
|
1371
|
-
/**
|
|
1372
|
-
* Integer property that tracks how many bites of cake have
|
|
1373
|
-
* been taken. Valid values are between 0 and 6 inclusive.
|
|
1374
|
-
*/
|
|
1375
|
-
static readonly biteCounter = 'bite_counter';
|
|
1376
|
-
static readonly blockLightLevel = 'block_light_level';
|
|
1377
|
-
static readonly bloom = 'bloom';
|
|
1378
|
-
static readonly booksStored = 'books_stored';
|
|
1379
|
-
/**
|
|
1380
|
-
* Boolean property that determines if a bottle is shown in the
|
|
1381
|
-
* first slot of the brewing stand.
|
|
1382
|
-
*/
|
|
1383
|
-
static readonly brewingStandSlotABit = 'brewing_stand_slot_a_bit';
|
|
1384
|
-
/**
|
|
1385
|
-
* Boolean property that determines if a bottle is shown in the
|
|
1386
|
-
* second slot of the brewing stand.
|
|
1387
|
-
*/
|
|
1388
|
-
static readonly brewingStandSlotBBit = 'brewing_stand_slot_b_bit';
|
|
1389
|
-
/**
|
|
1390
|
-
* Boolean property that determines if a bottle is shown in the
|
|
1391
|
-
* third slot of the brewing stand.
|
|
1392
|
-
*/
|
|
1393
|
-
static readonly brewingStandSlotCBit = 'brewing_stand_slot_c_bit';
|
|
1394
|
-
/**
|
|
1395
|
-
* Boolean property that determines if a button is in a pressed
|
|
1396
|
-
* state or not.
|
|
1397
|
-
*/
|
|
1398
|
-
static readonly buttonPressedBit = 'button_pressed_bit';
|
|
1399
|
-
/**
|
|
1400
|
-
* Integer property that describes how many extra candles are
|
|
1401
|
-
* in the same block space. Valid values are between 0 and 3
|
|
1402
|
-
* inclusive.
|
|
1403
|
-
*/
|
|
1404
|
-
static readonly candles = 'candles';
|
|
1405
|
-
static readonly canSummon = 'can_summon';
|
|
1406
|
-
/**
|
|
1407
|
-
* String property that represents the type of liquid in a
|
|
1408
|
-
* cauldron. Valid values are 'water', 'powder_snow', and
|
|
1409
|
-
* 'lava'.
|
|
1410
|
-
*/
|
|
1411
|
-
static readonly cauldronLiquid = 'cauldron_liquid';
|
|
1412
|
-
/**
|
|
1413
|
-
* String property that represents the type of work benches
|
|
1414
|
-
* that are within Minecraft Education experiences. Valid
|
|
1415
|
-
* values are 'compound_creator', 'material_reducer',
|
|
1416
|
-
* 'element_constructor' and 'lab_table'.
|
|
1417
|
-
*/
|
|
1418
|
-
static readonly chemistryTableType = 'chemistry_table_type';
|
|
1419
|
-
/**
|
|
1420
|
-
* String property determines the pattern of quartz and purpur
|
|
1421
|
-
* blocks. Valid values are 'default', 'chiseled', 'lines',
|
|
1422
|
-
* 'smooth'.
|
|
1423
|
-
*/
|
|
1424
|
-
static readonly chiselType = 'chisel_type';
|
|
1425
|
-
/**
|
|
1426
|
-
* Integer property that describes how many sea pickles are in
|
|
1427
|
-
* a cluster. Valid values are between 0 and 3 inclusive.
|
|
1428
|
-
*/
|
|
1429
|
-
static readonly clusterCount = 'cluster_count';
|
|
1430
|
-
/**
|
|
1431
|
-
* String property that represents the color of a block, like
|
|
1432
|
-
* wool. Valid values are 'white', 'orange', 'magenta',
|
|
1433
|
-
* 'light_blue', 'yellow', 'lime', 'pink', 'gray', 'silver',
|
|
1434
|
-
* 'cyan', 'purple', 'blue', 'brown', 'green', 'red' and
|
|
1435
|
-
* 'black'.
|
|
1436
|
-
*/
|
|
1437
|
-
static readonly color = 'color';
|
|
1438
|
-
/**
|
|
1439
|
-
* Boolean property that determines if a torch has a particular
|
|
1440
|
-
* color.
|
|
1441
|
-
*/
|
|
1442
|
-
static readonly colorBit = 'color_bit';
|
|
1443
|
-
static readonly composterFillLevel = 'composter_fill_level';
|
|
1444
|
-
/**
|
|
1445
|
-
* Boolean property that determines if a command block is
|
|
1446
|
-
* conditional or not.
|
|
1447
|
-
*/
|
|
1448
|
-
static readonly conditionalBit = 'conditional_bit';
|
|
1449
|
-
/**
|
|
1450
|
-
* String property that represents the color of a coral block.
|
|
1451
|
-
* Valid values are 'blue', 'pink', 'purple', 'red', 'yellow',
|
|
1452
|
-
* 'blue dead', 'pink dead', 'red dead', and 'yellow dead'.
|
|
1453
|
-
*/
|
|
1454
|
-
static readonly coralColor = 'coral_color';
|
|
1455
|
-
/**
|
|
1456
|
-
* Integer property that describes the rotation of coral fans.
|
|
1457
|
-
* Valid values are between 0 and 3 inclusive.
|
|
1458
|
-
*/
|
|
1459
|
-
static readonly coralDirection = 'coral_direction';
|
|
1460
|
-
static readonly coralFanDirection = 'coral_fan_direction';
|
|
1461
|
-
/**
|
|
1462
|
-
* Boolean property that represents the type of hanging for
|
|
1463
|
-
* coral fan.
|
|
1464
|
-
*/
|
|
1465
|
-
static readonly coralHangTypeBit = 'coral_hang_type_bit';
|
|
1466
|
-
/**
|
|
1467
|
-
* Boolean property that describes if a top snow block is
|
|
1468
|
-
* covering another block.
|
|
1469
|
-
*/
|
|
1470
|
-
static readonly coveredBit = 'covered_bit';
|
|
1471
|
-
/**
|
|
1472
|
-
* String property that determines the cracked state of turtle
|
|
1473
|
-
* eggs. Valid values are 'no_cracks', 'cracked', and
|
|
1474
|
-
* 'max_cracked'.
|
|
1475
|
-
*/
|
|
1476
|
-
static readonly crackedState = 'cracked_state';
|
|
1477
|
-
/**
|
|
1478
|
-
* String property that determines the damage state of an
|
|
1479
|
-
* anvil. Valid values are 'undamaged', 'slightly_damaged',
|
|
1480
|
-
* 'very_damaged', and 'broken'
|
|
1481
|
-
*/
|
|
1482
|
-
static readonly damage = 'damage';
|
|
1483
|
-
/**
|
|
1484
|
-
* Boolean property that determines if coral, coral fans, or
|
|
1485
|
-
* sea pickles are dead.
|
|
1486
|
-
*/
|
|
1487
|
-
static readonly deadBit = 'dead_bit';
|
|
1488
|
-
static readonly deprecated = 'deprecated';
|
|
1489
|
-
/**
|
|
1490
|
-
* Integer property determines the north, south, east, or west
|
|
1491
|
-
* direction of a block. Valid values include are south = 0,
|
|
1492
|
-
* west = 1, north = 2, east = 3.
|
|
1493
|
-
*/
|
|
1494
|
-
static readonly direction = 'direction';
|
|
1495
|
-
/**
|
|
1496
|
-
* String property that determines the dirt type of a block.
|
|
1497
|
-
* Valid values are 'normal' and 'coarse'.
|
|
1498
|
-
*/
|
|
1499
|
-
static readonly dirtType = 'dirt_type';
|
|
1500
|
-
/**
|
|
1501
|
-
* Boolean property that determines if a tripwire is disarmed
|
|
1502
|
-
* or not.
|
|
1503
|
-
*/
|
|
1504
|
-
static readonly disarmedBit = 'disarmed_bit';
|
|
1505
|
-
/**
|
|
1506
|
-
* Boolean property that determines if a door's hinge is
|
|
1507
|
-
* mirrored or not.
|
|
1508
|
-
*/
|
|
1509
|
-
static readonly doorHingeBit = 'door_hinge_bit';
|
|
1510
|
-
/**
|
|
1511
|
-
* String property that represents the type of a double plant
|
|
1512
|
-
* block. Valid values are 'sunflower', 'syringa', 'grass',
|
|
1513
|
-
* 'fern', 'rose', and 'paeonia'.
|
|
1514
|
-
*/
|
|
1515
|
-
static readonly doublePlantType = 'double_plant_type';
|
|
1516
|
-
/**
|
|
1517
|
-
* Boolean property that describes if bubble columns drag
|
|
1518
|
-
* entities down or push them up.
|
|
1519
|
-
*/
|
|
1520
|
-
static readonly dragDown = 'drag_down';
|
|
1521
|
-
/**
|
|
1522
|
-
* String property that represents the type of a pointed
|
|
1523
|
-
* dripstone block. Valid values are 'tip', 'frustum', 'base',
|
|
1524
|
-
* 'middle' and 'merge'.
|
|
1525
|
-
*/
|
|
1526
|
-
static readonly dripstoneThickness = 'dripstone_thickness';
|
|
1527
|
-
/**
|
|
1528
|
-
* Boolean property that determines if an end portal block has
|
|
1529
|
-
* an Eye of Ender in it.
|
|
1530
|
-
*/
|
|
1531
|
-
static readonly endPortalEyeBit = 'end_portal_eye_bit';
|
|
1532
|
-
/**
|
|
1533
|
-
* Boolean property that determines if a TNT block should start
|
|
1534
|
-
* its explode sequence.
|
|
1535
|
-
*/
|
|
1536
|
-
static readonly explodeBit = 'explode_bit';
|
|
1537
|
-
static readonly extinguished = 'extinguished';
|
|
1538
|
-
/**
|
|
1539
|
-
* Integer property that determines the facing direction of
|
|
1540
|
-
* some types of blocks. Valid values include down = 0, up = 1,
|
|
1541
|
-
* north = 2, south = 3, west = 4, east = 5.
|
|
1542
|
-
*/
|
|
1543
|
-
static readonly facingDirection = 'facing_direction';
|
|
1544
|
-
/**
|
|
1545
|
-
* Integer property that determines the fill level of a
|
|
1546
|
-
* cauldron block. Valid values are between 0 and 6 inclusive.
|
|
1547
|
-
*/
|
|
1548
|
-
static readonly fillLevel = 'fill_level';
|
|
1549
|
-
/**
|
|
1550
|
-
* String property that represents the type of flow. Valid
|
|
1551
|
-
* values are 'poppy', 'orchid', 'allium', 'houstonia',
|
|
1552
|
-
* 'tulip_red', 'tulip_orange', 'tulip_white', 'tulip_pink',
|
|
1553
|
-
* 'oxeye', 'cornflower' and 'lily_of_the_valley'.
|
|
1554
|
-
*/
|
|
1555
|
-
static readonly flowerType = 'flower_type';
|
|
1556
|
-
/**
|
|
1557
|
-
* Integer property that represents the rotation of signs and
|
|
1558
|
-
* standing banners. Valid values are between 0 and 15
|
|
1559
|
-
* inclusive.
|
|
1560
|
-
*/
|
|
1561
|
-
static readonly groundSignDirection = 'ground_sign_direction';
|
|
1562
|
-
static readonly growingPlantAge = 'growing_plant_age';
|
|
1563
|
-
/**
|
|
1564
|
-
* Integer property that determines the growth level of crops.
|
|
1565
|
-
* Valid values are between 0 and 7 inclusive.
|
|
1566
|
-
*/
|
|
1567
|
-
static readonly growth = 'growth';
|
|
1568
|
-
/**
|
|
1569
|
-
* Boolean property that represents if a lantern block is
|
|
1570
|
-
* hanging or not.
|
|
1571
|
-
*/
|
|
1572
|
-
static readonly hanging = 'hanging';
|
|
1573
|
-
/**
|
|
1574
|
-
* Boolean property that determines if a block is the pillow
|
|
1575
|
-
* side of a bed.
|
|
1576
|
-
*/
|
|
1577
|
-
static readonly headPieceBit = 'head_piece_bit';
|
|
1578
|
-
/**
|
|
1579
|
-
* Integer property that determines the height of a top snow
|
|
1580
|
-
* block. Valid values are between 0 and 7 inclusive.
|
|
1581
|
-
*/
|
|
1582
|
-
static readonly height = 'height';
|
|
1583
|
-
static readonly honeyLevel = 'honey_level';
|
|
1584
|
-
/**
|
|
1585
|
-
* Integer property that determines which huge mushroom block
|
|
1586
|
-
* should be displayed. Valid values are between 0 and 15
|
|
1587
|
-
* inclusive.
|
|
1588
|
-
*/
|
|
1589
|
-
static readonly hugeMushroomBits = 'huge_mushroom_bits';
|
|
1590
|
-
/**
|
|
1591
|
-
* Boolean property that determines if a block should burn
|
|
1592
|
-
* infinitely.
|
|
1593
|
-
*/
|
|
1594
|
-
static readonly infiniburnBit = 'infiniburn_bit';
|
|
1595
|
-
/**
|
|
1596
|
-
* Boolean property that determines if a fence block is
|
|
1597
|
-
* connected to a wall block.
|
|
1598
|
-
*/
|
|
1599
|
-
static readonly inWallBit = 'in_wall_bit';
|
|
1600
|
-
/**
|
|
1601
|
-
* Boolean property that describes if an item frame block has a
|
|
1602
|
-
* map in it.
|
|
1603
|
-
*/
|
|
1604
|
-
static readonly itemFrameMapBit = 'item_frame_map_bit';
|
|
1605
|
-
static readonly itemFramePhotoBit = 'item_frame_photo_bit';
|
|
1606
|
-
static readonly kelpAge = 'kelp_age';
|
|
1607
|
-
static readonly leverDirection = 'lever_direction';
|
|
1608
|
-
/**
|
|
1609
|
-
* Integer property that represents the level of liquid blocks.
|
|
1610
|
-
* Valid values are between 0 and 15 inclusive.
|
|
1611
|
-
*/
|
|
1612
|
-
static readonly liquidDepth = 'liquid_depth';
|
|
1613
|
-
/**
|
|
1614
|
-
* Boolean property that determines if a block is lit or not.
|
|
1615
|
-
*/
|
|
1616
|
-
static readonly lit = 'lit';
|
|
1617
|
-
/**
|
|
1618
|
-
* Integer property that represents the moisture level of crop.
|
|
1619
|
-
* Valid values are between 0 and 7 inclusive.
|
|
1620
|
-
*/
|
|
1621
|
-
static readonly moisturizedAmount = 'moisturized_amount';
|
|
1622
|
-
/**
|
|
1623
|
-
* String property that represents the stone type of an
|
|
1624
|
-
* Infested Stone block. Valid values are 'stone',
|
|
1625
|
-
* 'cobblestone', 'stone_brick', 'mossy_stone_brick',
|
|
1626
|
-
* 'cracked_stone_brick' and 'chiseled_stone_brick'.
|
|
1627
|
-
*/
|
|
1628
|
-
static readonly monsterEggStoneType = 'monster_egg_stone_type';
|
|
1629
|
-
static readonly multiFaceDirectionBits = 'multi_face_direction_bits';
|
|
1630
|
-
/**
|
|
1631
|
-
* String property that represents the leaf type of some block
|
|
1632
|
-
* types. Valid values are 'acacia' and 'dark_oak'.
|
|
1633
|
-
*/
|
|
1634
|
-
static readonly newLeafType = 'new_leaf_type';
|
|
1635
|
-
/**
|
|
1636
|
-
* String property that represents the wood type of certain
|
|
1637
|
-
* types of blocks. Valid values are 'acacia' and 'dark_oak'.
|
|
1638
|
-
*/
|
|
1639
|
-
static readonly newLogType = 'new_log_type';
|
|
1640
|
-
/**
|
|
1641
|
-
* Boolean property that determines if a skull block should
|
|
1642
|
-
* drop loot.
|
|
1643
|
-
*/
|
|
1644
|
-
static readonly noDropBit = 'no_drop_bit';
|
|
1645
|
-
/**
|
|
1646
|
-
* Boolean property that determines if a bed block is occupied.
|
|
1647
|
-
*/
|
|
1648
|
-
static readonly occupiedBit = 'occupied_bit';
|
|
1649
|
-
/**
|
|
1650
|
-
* String property that represents the leaf type of some block
|
|
1651
|
-
* types. Valid values are 'oak', 'spruce', 'birch', and
|
|
1652
|
-
* 'jungle'.
|
|
1653
|
-
*/
|
|
1654
|
-
static readonly oldLeafType = 'old_leaf_type';
|
|
1655
|
-
/**
|
|
1656
|
-
* String property that determines the wood type of certain
|
|
1657
|
-
* types of blocks. Valid values are 'oak', 'spruce', 'birch'
|
|
1658
|
-
* and 'jungle'.
|
|
1659
|
-
*/
|
|
1660
|
-
static readonly oldLogType = 'old_log_type';
|
|
1661
|
-
/**
|
|
1662
|
-
* Boolean property that determines if a door, gate, or
|
|
1663
|
-
* trapdoor is open.
|
|
1664
|
-
*/
|
|
1665
|
-
static readonly openBit = 'open_bit';
|
|
1666
|
-
/**
|
|
1667
|
-
* Boolean property that determines if a comparator's output is
|
|
1668
|
-
* lit.
|
|
1669
|
-
*/
|
|
1670
|
-
static readonly outputLitBit = 'output_lit_bit';
|
|
1671
|
-
/**
|
|
1672
|
-
* Boolean property that determines if a comparator is set to
|
|
1673
|
-
* subtract output.
|
|
1674
|
-
*/
|
|
1675
|
-
static readonly outputSubtractBit = 'output_subtract_bit';
|
|
1676
|
-
/**
|
|
1677
|
-
* Boolean property that determines if a leaf block is
|
|
1678
|
-
* persistent.
|
|
1679
|
-
*/
|
|
1680
|
-
static readonly persistentBit = 'persistent_bit';
|
|
1681
|
-
static readonly pillarAxis = 'pillar_axis';
|
|
1682
|
-
/**
|
|
1683
|
-
* String property that determines the orientation of portal
|
|
1684
|
-
* blocks. Valid values include 'unknown', 'x', and 'z'.
|
|
1685
|
-
*/
|
|
1686
|
-
static readonly portalAxis = 'portal_axis';
|
|
1687
|
-
/**
|
|
1688
|
-
* Boolean property that is true when an observer or tripwire
|
|
1689
|
-
* sends a redstone signal.
|
|
1690
|
-
*/
|
|
1691
|
-
static readonly poweredBit = 'powered_bit';
|
|
1692
|
-
static readonly prismarineBlockType = 'prismarine_block_type';
|
|
1693
|
-
static readonly propaguleStage = 'propagule_stage';
|
|
1694
|
-
/**
|
|
1695
|
-
* Boolean property that returns true if a rail has a redstone
|
|
1696
|
-
* signal.
|
|
1697
|
-
*/
|
|
1698
|
-
static readonly railDataBit = 'rail_data_bit';
|
|
1699
|
-
/**
|
|
1700
|
-
* Integer property determines the orientation of a placed rail
|
|
1701
|
-
* block. Valid values are between 0 and 8 inclusive.
|
|
1702
|
-
*/
|
|
1703
|
-
static readonly railDirection = 'rail_direction';
|
|
1704
|
-
/**
|
|
1705
|
-
* Integer property that determines the signal strength of a
|
|
1706
|
-
* redstone signal. Valid values are between 0 and 15
|
|
1707
|
-
* inclusive.
|
|
1708
|
-
*/
|
|
1709
|
-
static readonly redstoneSignal = 'redstone_signal';
|
|
1710
|
-
/**
|
|
1711
|
-
* Integer property that represents the amount of delay of a
|
|
1712
|
-
* repeater. Valid values are between 0 and 3 inclusive.
|
|
1713
|
-
*/
|
|
1714
|
-
static readonly repeaterDelay = 'repeater_delay';
|
|
1715
|
-
static readonly respawnAnchorCharge = 'respawn_anchor_charge';
|
|
1716
|
-
static readonly rotation = 'rotation';
|
|
1717
|
-
/**
|
|
1718
|
-
* String property that represents the pattern of a sandstone
|
|
1719
|
-
* block. Valid values are 'default', 'heiroglyphs', 'cut', and
|
|
1720
|
-
* 'smooth'.
|
|
1721
|
-
*/
|
|
1722
|
-
static readonly sandStoneType = 'sand_stone_type';
|
|
1723
|
-
/**
|
|
1724
|
-
* String property that represents the sand type of a block.
|
|
1725
|
-
* Valid values are 'normal' and 'red'.
|
|
1726
|
-
*/
|
|
1727
|
-
static readonly sandType = 'sand_type';
|
|
1728
|
-
/**
|
|
1729
|
-
* String property that determines the type of the sapling
|
|
1730
|
-
* block. Valid values are 'evergreen', 'birch', 'jungle',
|
|
1731
|
-
* 'acacia', and 'roofed_oak'.
|
|
1732
|
-
*/
|
|
1733
|
-
static readonly saplingType = 'sapling_type';
|
|
1734
|
-
/**
|
|
1735
|
-
* String property that determines the type of a sea grass
|
|
1736
|
-
* block. Valid values are 'default', 'double_top' and
|
|
1737
|
-
* 'double_bot'.
|
|
1738
|
-
*/
|
|
1739
|
-
static readonly seaGrassType = 'sea_grass_type';
|
|
1740
|
-
/**
|
|
1741
|
-
* String property that represents the type of a sponge block.
|
|
1742
|
-
* Valid values are 'dry' and 'wet'.
|
|
1743
|
-
*/
|
|
1744
|
-
static readonly spongeType = 'sponge_type';
|
|
1745
|
-
/**
|
|
1746
|
-
* Integer property that determines the stability of a
|
|
1747
|
-
* scaffolding block. Valid values are between 0 and 5
|
|
1748
|
-
* inclusive.
|
|
1749
|
-
*/
|
|
1750
|
-
static readonly stability = 'stability';
|
|
1751
|
-
/**
|
|
1752
|
-
* Boolean property that describes if a scaffolding block has
|
|
1753
|
-
* been checked for stability.
|
|
1754
|
-
*/
|
|
1755
|
-
static readonly stabilityCheck = 'stability_check';
|
|
1756
|
-
/**
|
|
1757
|
-
* String property that determines the type of a stone brick
|
|
1758
|
-
* block. Valid values are 'default', 'mossy', 'cracked',
|
|
1759
|
-
* 'chiseled' and 'smooth'.
|
|
1760
|
-
*/
|
|
1761
|
-
static readonly stoneBrickType = 'stone_brick_type';
|
|
1762
|
-
/**
|
|
1763
|
-
* String property that represents the type of certain types of
|
|
1764
|
-
* stone slab blocks. Valid values are 'smooth_stone',
|
|
1765
|
-
* 'sandstone', 'wood', 'cobblestone', 'brick', 'stone_brick',
|
|
1766
|
-
* 'quartz' and 'nether_brick'.
|
|
1767
|
-
*/
|
|
1768
|
-
static readonly stoneSlabType = 'stone_slab_type';
|
|
1769
|
-
/**
|
|
1770
|
-
* String property that represents the type of certain types of
|
|
1771
|
-
* stone slab blocks. Valid values are 'red_sandstone',
|
|
1772
|
-
* 'purpur', 'prismarine_rough', 'prismarine_dark',
|
|
1773
|
-
* 'prismarine_brick', 'mossy_cobblestone', 'smooth_sandstone'
|
|
1774
|
-
* and 'red_nether_brick'.
|
|
1775
|
-
*/
|
|
1776
|
-
static readonly stoneSlabType2 = 'stone_slab_type_2';
|
|
1777
|
-
/**
|
|
1778
|
-
* String property that represents the type of certain types of
|
|
1779
|
-
* stone slab blocks. Valid values are 'end_stone_brick',
|
|
1780
|
-
* 'smooth_red_sandstone', 'polished_andesite', 'andesite',
|
|
1781
|
-
* 'diorite', 'polished_diorite', 'granite', and
|
|
1782
|
-
* 'polished_granite'.
|
|
1783
|
-
*/
|
|
1784
|
-
static readonly stoneSlabType3 = 'stone_slab_type_3';
|
|
1785
|
-
/**
|
|
1786
|
-
* String property that represents the type of certain types of
|
|
1787
|
-
* stone slab blocks. Valid values are 'mossy_stone_brick',
|
|
1788
|
-
* 'smooth_quartz', 'stone', 'cut_sandstone', and
|
|
1789
|
-
* 'cut_red_sandstone'.
|
|
1790
|
-
*/
|
|
1791
|
-
static readonly stoneSlabType4 = 'stone_slab_type_4';
|
|
1792
|
-
/**
|
|
1793
|
-
* String property that determines the type of a stone block.
|
|
1794
|
-
* Valid values are 'stone', 'granite', 'granite_smooth',
|
|
1795
|
-
* 'diorite', 'diorite_smooth', 'andesite', and
|
|
1796
|
-
* 'andesite_smooth'.
|
|
1797
|
-
*/
|
|
1798
|
-
static readonly stoneType = 'stone_type';
|
|
1799
|
-
/**
|
|
1800
|
-
* Boolean property that represents if a wood log has been
|
|
1801
|
-
* stripped of bark.
|
|
1802
|
-
*/
|
|
1803
|
-
static readonly strippedBit = 'stripped_bit';
|
|
1804
|
-
/**
|
|
1805
|
-
* String property that represents the state of a structure
|
|
1806
|
-
* block. Valid values are 'data', 'save', 'load', 'corner',
|
|
1807
|
-
* 'invalid' and 'export'.
|
|
1808
|
-
*/
|
|
1809
|
-
static readonly structureBlockType = 'structure_block_type';
|
|
1810
|
-
/**
|
|
1811
|
-
* String property that determines which void mode to draw for
|
|
1812
|
-
* structure blocks. Valid values are 'void' and 'air'.
|
|
1813
|
-
*/
|
|
1814
|
-
static readonly structureVoidType = 'structure_void_type';
|
|
1815
|
-
/**
|
|
1816
|
-
* Boolean property that indicates if a tripwire block is
|
|
1817
|
-
* suspended.
|
|
1818
|
-
*/
|
|
1819
|
-
static readonly suspendedBit = 'suspended_bit';
|
|
1820
|
-
/**
|
|
1821
|
-
* String property that represents the type of a tall grass
|
|
1822
|
-
* block. Valid values are 'default', 'tall', 'fern', and
|
|
1823
|
-
* 'snow'.
|
|
1824
|
-
*/
|
|
1825
|
-
static readonly tallGrassType = 'tall_grass_type';
|
|
1826
|
-
/**
|
|
1827
|
-
* Boolean property that determines if a hopper block is active
|
|
1828
|
-
* or not.
|
|
1829
|
-
*/
|
|
1830
|
-
static readonly toggleBit = 'toggle_bit';
|
|
1831
|
-
/**
|
|
1832
|
-
* Boolean property that determines if a slab is the top half
|
|
1833
|
-
* of the block or not
|
|
1834
|
-
*/
|
|
1835
|
-
static readonly topSlotBit = 'top_slot_bit';
|
|
1836
|
-
/**
|
|
1837
|
-
* String property that determines the direction of a torch in
|
|
1838
|
-
* relation to the block it is attached to. Valid values are
|
|
1839
|
-
* 'unknown', 'west', 'east', 'north', 'south', 'top'.
|
|
1840
|
-
*/
|
|
1841
|
-
static readonly torchFacingDirection = 'torch_facing_direction';
|
|
1842
|
-
/**
|
|
1843
|
-
* Boolean property that determines if a dispenser is
|
|
1844
|
-
* triggered.
|
|
1845
|
-
*/
|
|
1846
|
-
static readonly triggeredBit = 'triggered_bit';
|
|
1847
|
-
/**
|
|
1848
|
-
* String property that represents the amount of turtle eggs in
|
|
1849
|
-
* an egg block. Valid values are 'one_egg', 'two_egg',
|
|
1850
|
-
* 'three_egg' and 'four_egg'.
|
|
1851
|
-
*/
|
|
1852
|
-
static readonly turtleEggCount = 'turtle_egg_count';
|
|
1853
|
-
static readonly twistingVinesAge = 'twisting_vines_age';
|
|
1854
|
-
/**
|
|
1855
|
-
* Boolean property that determines if a leaf block or flower
|
|
1856
|
-
* block should be updated.
|
|
1857
|
-
*/
|
|
1858
|
-
static readonly updateBit = 'update_bit';
|
|
1859
|
-
/**
|
|
1860
|
-
* Boolean property that determines if a block is the upper
|
|
1861
|
-
* half of an object like a door or a tall plant.
|
|
1862
|
-
*/
|
|
1863
|
-
static readonly upperBlockBit = 'upper_block_bit';
|
|
1864
|
-
/**
|
|
1865
|
-
* Boolean property that determines if a stair block or
|
|
1866
|
-
* trapdoor block is upside-down.
|
|
1867
|
-
*/
|
|
1868
|
-
static readonly upsideDownBit = 'upside_down_bit';
|
|
1869
|
-
/**
|
|
1870
|
-
* Integer property that represents the facing direction for
|
|
1871
|
-
* vines. Valid values are between 0 and 15 inclusive.
|
|
1872
|
-
*/
|
|
1873
|
-
static readonly vineDirectionBits = 'vine_direction_bits';
|
|
1874
|
-
/**
|
|
1875
|
-
* String property that represents the type of stone used in a
|
|
1876
|
-
* wall block. Valid values are 'cobblestone',
|
|
1877
|
-
* 'mossy_cobblestone', 'granite', 'diorite', 'andesite',
|
|
1878
|
-
* 'sandstone', 'brick', 'stone_brick', 'mossy_stone_brick',
|
|
1879
|
-
* 'nether_brick', 'end_brick', 'prismarine', 'red_sandstone'
|
|
1880
|
-
* and 'red_nether_brick'.
|
|
1881
|
-
*/
|
|
1882
|
-
static readonly wallBlockType = 'wall_block_type';
|
|
1883
|
-
/**
|
|
1884
|
-
* String property that determines what kind of connection a
|
|
1885
|
-
* wall has to the east. Valid values are 'none', 'short' and
|
|
1886
|
-
* 'tall'.
|
|
1887
|
-
*/
|
|
1888
|
-
static readonly wallConnectionTypeEast = 'wall_connection_type_east';
|
|
1889
|
-
/**
|
|
1890
|
-
* String property that determines what kind of connection a
|
|
1891
|
-
* wall has to the north. Valid values are 'none', 'short' and
|
|
1892
|
-
* 'tall'.
|
|
1893
|
-
*/
|
|
1894
|
-
static readonly wallConnectionTypeNorth = 'wall_connection_type_north';
|
|
1895
|
-
/**
|
|
1896
|
-
* String property that determines what kind of connection a
|
|
1897
|
-
* wall has to the south. Valid values are 'none', 'short' and
|
|
1898
|
-
* 'tall'.
|
|
1899
|
-
*/
|
|
1900
|
-
static readonly wallConnectionTypeSouth = 'wall_connection_type_south';
|
|
1901
|
-
/**
|
|
1902
|
-
* String property that determines what kind of connection a
|
|
1903
|
-
* wall has to the west. Valid values are 'none', 'short' and
|
|
1904
|
-
* 'tall'.
|
|
1905
|
-
*/
|
|
1906
|
-
static readonly wallConnectionTypeWest = 'wall_connection_type_west';
|
|
1907
|
-
/**
|
|
1908
|
-
* Boolean property that determines if a wall should contain a
|
|
1909
|
-
* post.
|
|
1910
|
-
*/
|
|
1911
|
-
static readonly wallPostBit = 'wall_post_bit';
|
|
1912
|
-
static readonly weepingVinesAge = 'weeping_vines_age';
|
|
1913
|
-
/**
|
|
1914
|
-
* Integer property that represents the rotation of stairs.
|
|
1915
|
-
* Valid values are between 0 and 3 inclusive.
|
|
1916
|
-
*/
|
|
1917
|
-
static readonly weirdoDirection = 'weirdo_direction';
|
|
1918
|
-
/**
|
|
1919
|
-
* String property that determines the wood type of a block.
|
|
1920
|
-
* Valid values are 'oak', 'spruce', 'birch', 'jungle',
|
|
1921
|
-
* 'acacia', and 'dark_oak'.
|
|
1922
|
-
*/
|
|
1923
|
-
static readonly woodType = 'wood_type';
|
|
1229
|
+
static get(propertyName: string): BlockPropertyType;
|
|
1230
|
+
static getAll(): BlockPropertyType[];
|
|
1231
|
+
}
|
|
1232
|
+
export class BlockPropertyType {
|
|
1233
|
+
protected constructor();
|
|
1234
|
+
readonly id: string;
|
|
1235
|
+
readonly validValues: (boolean | number | string)[];
|
|
1924
1236
|
}
|
|
1925
1237
|
/**
|
|
1926
1238
|
* @beta
|
|
@@ -2023,15 +1335,6 @@ export class BlockType {
|
|
|
2023
1335
|
* Block type name - for example, `minecraft:acacia_stairs`.
|
|
2024
1336
|
*/
|
|
2025
1337
|
readonly id: string;
|
|
2026
|
-
/**
|
|
2027
|
-
* @remarks
|
|
2028
|
-
* Creates the default {@link BlockPermutation} for this type
|
|
2029
|
-
* which uses the default values for all properties.
|
|
2030
|
-
* @returns
|
|
2031
|
-
* Returns created permutation.
|
|
2032
|
-
* @throws This function can throw errors.
|
|
2033
|
-
*/
|
|
2034
|
-
createDefaultBlockPermutation(): BlockPermutation;
|
|
2035
1338
|
}
|
|
2036
1339
|
/**
|
|
2037
1340
|
* @beta
|
|
@@ -2066,28 +1369,6 @@ export class BlockWaterContainerComponent extends BlockComponent {
|
|
|
2066
1369
|
getCustomColor(): Color;
|
|
2067
1370
|
setCustomColor(color: Color): void;
|
|
2068
1371
|
}
|
|
2069
|
-
/**
|
|
2070
|
-
* @beta
|
|
2071
|
-
* Contains the state of a boolean-based property for a {@link
|
|
2072
|
-
* BlockPermutation}.
|
|
2073
|
-
*/
|
|
2074
|
-
export class BoolBlockProperty extends IBlockProperty {
|
|
2075
|
-
protected constructor();
|
|
2076
|
-
/**
|
|
2077
|
-
* The name of this property.
|
|
2078
|
-
*/
|
|
2079
|
-
readonly name: string;
|
|
2080
|
-
/**
|
|
2081
|
-
* The current value of this property.
|
|
2082
|
-
* @throws
|
|
2083
|
-
* Setting this property can throw if the value passed is not
|
|
2084
|
-
* valid for the property. Use {@link
|
|
2085
|
-
* @minecraft/server.BoolBlockProperty.validValues} to check
|
|
2086
|
-
* allowed values.
|
|
2087
|
-
*/
|
|
2088
|
-
value: boolean;
|
|
2089
|
-
getValidValues(): boolean[];
|
|
2090
|
-
}
|
|
2091
1372
|
/**
|
|
2092
1373
|
* @beta
|
|
2093
1374
|
* Contains information related to changes to a button push.
|
|
@@ -2210,23 +1491,26 @@ export class CommandResult {
|
|
|
2210
1491
|
export class Container {
|
|
2211
1492
|
protected constructor();
|
|
2212
1493
|
/**
|
|
2213
|
-
*
|
|
2214
|
-
*
|
|
2215
|
-
*
|
|
1494
|
+
* Count of the slots in the container that are empty.
|
|
1495
|
+
* @throws
|
|
1496
|
+
* Throws if the container is invalid.
|
|
2216
1497
|
*/
|
|
2217
1498
|
readonly emptySlotsCount: number;
|
|
2218
1499
|
/**
|
|
2219
|
-
*
|
|
2220
|
-
* standard single-block chest has a size of 27,
|
|
2221
|
-
*
|
|
2222
|
-
*
|
|
1500
|
+
* The number of slots in this container. For example, a
|
|
1501
|
+
* standard single-block chest has a size of 27. Note, a
|
|
1502
|
+
* player's inventory container contains a total of 36 slots, 9
|
|
1503
|
+
* hotbar slots plus 27 inventory slots.
|
|
1504
|
+
* @throws
|
|
1505
|
+
* Throws if the container is invalid.
|
|
2223
1506
|
*/
|
|
2224
1507
|
readonly size: number;
|
|
2225
1508
|
/**
|
|
2226
1509
|
* @remarks
|
|
2227
|
-
* Adds an item to the
|
|
2228
|
-
*
|
|
2229
|
-
*
|
|
1510
|
+
* Adds an item to the container. The item is placed in the
|
|
1511
|
+
* first available slot(s) and can be stacked with existing
|
|
1512
|
+
* items of the same type. Note, use {@link Container.setItem}
|
|
1513
|
+
* if you wish to set the item in a particular slot.
|
|
2230
1514
|
* @param itemStack
|
|
2231
1515
|
* The stack of items to add.
|
|
2232
1516
|
* @throws This function can throw errors.
|
|
@@ -2235,41 +1519,49 @@ export class Container {
|
|
|
2235
1519
|
/**
|
|
2236
1520
|
* @remarks
|
|
2237
1521
|
* Clears all inventory items in the container.
|
|
2238
|
-
* @throws
|
|
1522
|
+
* @throws
|
|
1523
|
+
* Throws if the container is invalid.
|
|
2239
1524
|
*/
|
|
2240
1525
|
clearAll(): void;
|
|
2241
1526
|
/**
|
|
2242
1527
|
* @remarks
|
|
2243
1528
|
* Clears a specific item at a slot within the container.
|
|
2244
1529
|
* @param slot
|
|
2245
|
-
* @throws
|
|
1530
|
+
* @throws
|
|
1531
|
+
* Throws if the container is invalid.
|
|
2246
1532
|
*/
|
|
2247
1533
|
clearItem(slot: number): void;
|
|
2248
1534
|
/**
|
|
2249
1535
|
* @remarks
|
|
2250
|
-
* Gets
|
|
2251
|
-
*
|
|
2252
|
-
*
|
|
1536
|
+
* Gets an {@link ItemStack} of the item at the specified slot.
|
|
1537
|
+
* If the slot is empty, returns `undefined`. This method does
|
|
1538
|
+
* not change or clear the contents of the specified slot. To
|
|
1539
|
+
* get a reference to a particular slot, see {@link
|
|
1540
|
+
* Container.getSlot}.
|
|
2253
1541
|
* @param slot
|
|
2254
1542
|
* Zero-based index of the slot to retrieve items from.
|
|
2255
|
-
* @throws
|
|
2256
|
-
*
|
|
1543
|
+
* @throws
|
|
1544
|
+
* Throws if the container is invalid or if the `slot` index is
|
|
1545
|
+
* out of bounds.
|
|
1546
|
+
* @example getItem.ts
|
|
2257
1547
|
* ```typescript
|
|
2258
|
-
*
|
|
2259
|
-
* const
|
|
2260
|
-
*
|
|
2261
|
-
* const itemStack = rightChestContainer.getItem(0);
|
|
1548
|
+
* // Get a copy of the first item in the player's hotbar
|
|
1549
|
+
* const inventory = player.getComponent("inventory") as EntityInventoryComponent;
|
|
1550
|
+
* const itemStack = inventory.container.getItem(0);
|
|
2262
1551
|
*
|
|
2263
|
-
* test.assert(itemStack.id === "apple", "Expected apple");
|
|
2264
|
-
* test.assert(itemStack.amount === 10, "Expected 10 apples");
|
|
2265
1552
|
* ```
|
|
2266
1553
|
*/
|
|
2267
1554
|
getItem(slot: number): ItemStack;
|
|
2268
1555
|
/**
|
|
2269
1556
|
* @remarks
|
|
2270
|
-
* Returns a container slot
|
|
1557
|
+
* Returns a container slot. This acts as a reference to a slot
|
|
1558
|
+
* at the given index for this container.
|
|
2271
1559
|
* @param slot
|
|
2272
|
-
*
|
|
1560
|
+
* The index of the slot to return. This index must be within
|
|
1561
|
+
* the bounds of the container.
|
|
1562
|
+
* @throws
|
|
1563
|
+
* Throws if the container is invalid or if the `slot` index is
|
|
1564
|
+
* out of bounds.
|
|
2273
1565
|
*/
|
|
2274
1566
|
getSlot(slot: number): ContainerSlot;
|
|
2275
1567
|
/**
|
|
@@ -2278,8 +1570,11 @@ export class Container {
|
|
|
2278
1570
|
* @param slot
|
|
2279
1571
|
* Zero-based index of the slot to set an item at.
|
|
2280
1572
|
* @param itemStack
|
|
2281
|
-
* Stack of items to place within the specified slot.
|
|
2282
|
-
*
|
|
1573
|
+
* Stack of items to place within the specified slot. Setting
|
|
1574
|
+
* `itemStack` to undefined will clear the slot.
|
|
1575
|
+
* @throws
|
|
1576
|
+
* Throws if the container is invalid or if the `slot` index is
|
|
1577
|
+
* out of bounds.
|
|
2283
1578
|
*/
|
|
2284
1579
|
setItem(slot: number, itemStack?: ItemStack): void;
|
|
2285
1580
|
/**
|
|
@@ -2292,28 +1587,38 @@ export class Container {
|
|
|
2292
1587
|
* @param otherContainer
|
|
2293
1588
|
* Target container to swap with. Note this can be the same
|
|
2294
1589
|
* container as this source.
|
|
2295
|
-
* @throws
|
|
2296
|
-
*
|
|
1590
|
+
* @throws
|
|
1591
|
+
* Throws if either this container or `otherContainer` are
|
|
1592
|
+
* invalid or if the `slot` or `otherSlot` are out of bounds.
|
|
1593
|
+
* @example swapItems.ts
|
|
2297
1594
|
* ```typescript
|
|
2298
|
-
*
|
|
1595
|
+
* // Swaps an item between slots 0 and 4 in the player's inventory
|
|
1596
|
+
* const inventory = fromPlayer.getComponent('inventory') as EntityInventoryComponent;
|
|
1597
|
+
* inventory.container.swapItems(0, 4, inventory);
|
|
2299
1598
|
*
|
|
2300
1599
|
* ```
|
|
2301
1600
|
*/
|
|
2302
1601
|
swapItems(slot: number, otherSlot: number, otherContainer: Container): boolean;
|
|
2303
1602
|
/**
|
|
2304
1603
|
* @remarks
|
|
2305
|
-
* Moves an item from one slot to another,
|
|
2306
|
-
*
|
|
1604
|
+
* Moves an item from one slot to another container, or to the
|
|
1605
|
+
* first available slot in the same container.
|
|
2307
1606
|
* @param fromSlot
|
|
1607
|
+
* Zero-based index of the slot to transfer an item from, on
|
|
1608
|
+
* this container.
|
|
2308
1609
|
* @param toSlot
|
|
2309
|
-
* Zero-based index of the slot to move to.
|
|
2310
1610
|
* @param toContainer
|
|
2311
1611
|
* Target container to transfer to. Note this can be the same
|
|
2312
1612
|
* container as the source.
|
|
2313
|
-
* @throws
|
|
2314
|
-
*
|
|
1613
|
+
* @throws
|
|
1614
|
+
* Throws if either this container or `toContainer` are invalid
|
|
1615
|
+
* or if the `fromSlot` or `toSlot` indices out of bounds.
|
|
1616
|
+
* @example transferItem.ts
|
|
2315
1617
|
* ```typescript
|
|
2316
|
-
*
|
|
1618
|
+
* // Transfer an item from the first slot of fromPlayer's inventory to toPlayer's inventory
|
|
1619
|
+
* const fromInventory = fromPlayer.getComponent('inventory') as EntityInventoryComponent;
|
|
1620
|
+
* const toInventory = toPlayer.getComponent('inventory') as EntityInventoryComponent;
|
|
1621
|
+
* fromInventory.container.transferItem(0, toInventory.container);
|
|
2317
1622
|
*
|
|
2318
1623
|
* ```
|
|
2319
1624
|
*/
|
|
@@ -2327,65 +1632,130 @@ export class Container {
|
|
|
2327
1632
|
export class ContainerSlot {
|
|
2328
1633
|
protected constructor();
|
|
2329
1634
|
/**
|
|
2330
|
-
*
|
|
1635
|
+
* Number of the items in the stack. Valid values range between
|
|
1636
|
+
* 1-255. The provided value will be clamped to the item's
|
|
1637
|
+
* maximum stack size.
|
|
1638
|
+
* @throws
|
|
1639
|
+
* Throws if the value is outside the range of 1-255.
|
|
2331
1640
|
*/
|
|
2332
1641
|
amount: number;
|
|
1642
|
+
data: number;
|
|
2333
1643
|
/**
|
|
2334
|
-
*
|
|
1644
|
+
* Returns whether the item is stackable. An item is considered
|
|
1645
|
+
* stackable if the item's maximum stack size is greater than 1
|
|
1646
|
+
* and the item does not contain any custom data or properties.
|
|
1647
|
+
* @throws
|
|
1648
|
+
* Throws if the slot's container is invalid.
|
|
2335
1649
|
*/
|
|
2336
|
-
data: number;
|
|
2337
1650
|
readonly isStackable: boolean;
|
|
1651
|
+
readonly isValid: boolean;
|
|
2338
1652
|
/**
|
|
2339
|
-
*
|
|
2340
|
-
*
|
|
2341
|
-
* slot
|
|
1653
|
+
* Gets or sets whether the item is kept on death.
|
|
1654
|
+
* @throws
|
|
1655
|
+
* Throws if the slot's container is invalid.
|
|
2342
1656
|
*/
|
|
2343
|
-
readonly isValid: boolean;
|
|
2344
1657
|
keepOnDeath: boolean;
|
|
1658
|
+
/**
|
|
1659
|
+
* Gets or sets the item's lock mode. The default value is
|
|
1660
|
+
* `ItemLockMode.none`.
|
|
1661
|
+
* @throws
|
|
1662
|
+
* Throws if the slot's container is invalid.
|
|
1663
|
+
*/
|
|
2345
1664
|
lockMode: ItemLockMode;
|
|
1665
|
+
/**
|
|
1666
|
+
* The maximum stack size. This value varies depending on the
|
|
1667
|
+
* type of item. For example, torches have a maximum stack size
|
|
1668
|
+
* of 64, while eggs have a maximum stack size of 16.
|
|
1669
|
+
* @throws
|
|
1670
|
+
* Throws if the slot's container is invalid.
|
|
1671
|
+
*/
|
|
2346
1672
|
readonly maxAmount: number;
|
|
2347
1673
|
/**
|
|
2348
|
-
*
|
|
1674
|
+
* Given name of this stack of items. The name tag is displayed
|
|
1675
|
+
* when hovering over the item. Setting the name tag to an
|
|
1676
|
+
* empty string or `undefined` will remove the name tag.
|
|
1677
|
+
* @throws
|
|
1678
|
+
* Throws if the slot's container is invalid. Also throws if
|
|
1679
|
+
* the length exceeds 255 characters.
|
|
2349
1680
|
*/
|
|
2350
1681
|
nameTag?: string;
|
|
1682
|
+
/**
|
|
1683
|
+
* The type of the item.
|
|
1684
|
+
* @throws
|
|
1685
|
+
* Throws if the slot's container is invalid.
|
|
1686
|
+
*/
|
|
2351
1687
|
readonly 'type': ItemType;
|
|
2352
1688
|
/**
|
|
2353
|
-
*
|
|
2354
|
-
*
|
|
2355
|
-
*
|
|
1689
|
+
* Identifier of the type of items for the stack. If a
|
|
1690
|
+
* namespace is not specified, 'minecraft:' is assumed.
|
|
1691
|
+
* Examples include 'wheat' or 'apple'.
|
|
1692
|
+
* @throws
|
|
1693
|
+
* Throws if the slot's container is invalid.
|
|
2356
1694
|
*/
|
|
2357
1695
|
readonly typeId?: string;
|
|
2358
|
-
clone(): ItemStack;
|
|
2359
1696
|
/**
|
|
2360
1697
|
* @remarks
|
|
2361
|
-
*
|
|
2362
|
-
*
|
|
1698
|
+
* Creates an exact copy of the item stack, including any
|
|
1699
|
+
* custom data or properties.
|
|
1700
|
+
* @throws
|
|
1701
|
+
* Throws if the slot's container is invalid.
|
|
2363
1702
|
*/
|
|
1703
|
+
clone(): ItemStack;
|
|
2364
1704
|
getItem(): ItemStack;
|
|
2365
1705
|
/**
|
|
2366
1706
|
* @remarks
|
|
2367
|
-
* Returns the lore value
|
|
2368
|
-
*
|
|
2369
|
-
* @
|
|
1707
|
+
* Returns the lore value - a secondary display string - for an
|
|
1708
|
+
* ItemStack.
|
|
1709
|
+
* @returns
|
|
1710
|
+
* An array of lore strings. If the item does not have lore,
|
|
1711
|
+
* returns an empty array.
|
|
1712
|
+
* @throws
|
|
1713
|
+
* Throws if the slot's container is invalid.
|
|
2370
1714
|
*/
|
|
2371
1715
|
getLore(): string[];
|
|
1716
|
+
/**
|
|
1717
|
+
* @remarks
|
|
1718
|
+
* Returns whether this item stack can be stacked with the
|
|
1719
|
+
* given `itemStack`. This is determined by comparing the item
|
|
1720
|
+
* type and any custom data and properties associated with the
|
|
1721
|
+
* item stacks. The amount of each item stack is not taken into
|
|
1722
|
+
* consideration.
|
|
1723
|
+
* @param itemStack
|
|
1724
|
+
* @throws
|
|
1725
|
+
* Throws if the slot's container is invalid.
|
|
1726
|
+
*/
|
|
2372
1727
|
isStackableWith(itemStack: ItemStack): boolean;
|
|
1728
|
+
/**
|
|
1729
|
+
* @remarks
|
|
1730
|
+
* The list of block types this item can break in Adventure
|
|
1731
|
+
* mode. The block names are displayed in the item's tooltip.
|
|
1732
|
+
* Setting the value to undefined will clear the list.
|
|
1733
|
+
* @param blockIdentifiers
|
|
1734
|
+
* @throws
|
|
1735
|
+
* Throws if the slot's container is invalid. Also throws if
|
|
1736
|
+
* any of the provided block identifiers are invalid.
|
|
1737
|
+
*/
|
|
2373
1738
|
setCanDestroy(blockIdentifiers?: string[]): void;
|
|
2374
|
-
setCanPlaceOn(blockIdentifiers?: string[]): void;
|
|
2375
1739
|
/**
|
|
2376
1740
|
* @remarks
|
|
2377
|
-
*
|
|
2378
|
-
*
|
|
2379
|
-
*
|
|
2380
|
-
*
|
|
1741
|
+
* The list of block types this item can be placed on in
|
|
1742
|
+
* Adventure mode. This is only applicable to block items. The
|
|
1743
|
+
* block names are displayed in the item's tooltip. Setting the
|
|
1744
|
+
* value to undefined will clear the list.
|
|
1745
|
+
* @param blockIdentifiers
|
|
1746
|
+
* @throws
|
|
1747
|
+
* Throws if the slot's container is invalid. Also throws if
|
|
1748
|
+
* any of the provided block identifiers are invalid.
|
|
2381
1749
|
*/
|
|
1750
|
+
setCanPlaceOn(blockIdentifiers?: string[]): void;
|
|
2382
1751
|
setItem(itemStack?: ItemStack): void;
|
|
2383
1752
|
/**
|
|
2384
1753
|
* @remarks
|
|
2385
|
-
* Sets the lore
|
|
1754
|
+
* Sets the lore value - a secondary display string - for an
|
|
1755
|
+
* ItemStack.
|
|
2386
1756
|
* @param loreList
|
|
2387
|
-
*
|
|
2388
|
-
*
|
|
1757
|
+
* @throws
|
|
1758
|
+
* Throws if the slot's container is invalid.
|
|
2389
1759
|
*/
|
|
2390
1760
|
setLore(loreList?: string[]): void;
|
|
2391
1761
|
}
|
|
@@ -2544,8 +1914,7 @@ export class Dimension {
|
|
|
2544
1914
|
* defined via the EntityQueryOptions set of filter criteria.
|
|
2545
1915
|
* @param getEntities
|
|
2546
1916
|
* @returns
|
|
2547
|
-
* An entity
|
|
2548
|
-
* returned entities.
|
|
1917
|
+
* An entity array.
|
|
2549
1918
|
* @throws This function can throw errors.
|
|
2550
1919
|
* @example testThatEntityIsFeatherItem.ts
|
|
2551
1920
|
* ```typescript
|
|
@@ -2597,8 +1966,7 @@ export class Dimension {
|
|
|
2597
1966
|
* defined via the EntityQueryOptions set of filter criteria.
|
|
2598
1967
|
* @param getPlayers
|
|
2599
1968
|
* @returns
|
|
2600
|
-
*
|
|
2601
|
-
* returned players.
|
|
1969
|
+
* A player array.
|
|
2602
1970
|
* @throws This function can throw errors.
|
|
2603
1971
|
*/
|
|
2604
1972
|
getPlayers(getPlayers?: EntityQueryOptions): PlayerIterator;
|
|
@@ -2727,7 +2095,7 @@ export class Dimension {
|
|
|
2727
2095
|
* For block properties that take a direction, provides a
|
|
2728
2096
|
* structured way to specify the direction of a block property.
|
|
2729
2097
|
*/
|
|
2730
|
-
export class DirectionBlockProperty
|
|
2098
|
+
export class DirectionBlockProperty {
|
|
2731
2099
|
protected constructor();
|
|
2732
2100
|
/**
|
|
2733
2101
|
* Name of the property.
|
|
@@ -5429,14 +4797,26 @@ export class EntityRideableComponent extends IEntityComponent {
|
|
|
5429
4797
|
* Entity that should be ejected from this entity.
|
|
5430
4798
|
* @throws This function can throw errors.
|
|
5431
4799
|
*/
|
|
5432
|
-
ejectRider(rider: Entity): void;
|
|
4800
|
+
ejectRider(rider: Entity): void;
|
|
4801
|
+
/**
|
|
4802
|
+
* @remarks
|
|
4803
|
+
* Ejects all riders of this entity.
|
|
4804
|
+
* @throws This function can throw errors.
|
|
4805
|
+
*/
|
|
4806
|
+
ejectRiders(): void;
|
|
4807
|
+
/**
|
|
4808
|
+
* @remarks
|
|
4809
|
+
* A string-list of entity types that this entity can support
|
|
4810
|
+
* as riders.
|
|
4811
|
+
* @throws This function can throw errors.
|
|
4812
|
+
*/
|
|
4813
|
+
getFamilyTypes(): string[];
|
|
5433
4814
|
/**
|
|
5434
4815
|
* @remarks
|
|
5435
|
-
*
|
|
4816
|
+
* Gets a list of positions and number of riders for each
|
|
4817
|
+
* position for entities riding this entity.
|
|
5436
4818
|
* @throws This function can throw errors.
|
|
5437
4819
|
*/
|
|
5438
|
-
ejectRiders(): void;
|
|
5439
|
-
getFamilyTypes(): string[];
|
|
5440
4820
|
getSeats(): Seat[];
|
|
5441
4821
|
}
|
|
5442
4822
|
/**
|
|
@@ -6034,18 +5414,6 @@ export class FluidContainer {
|
|
|
6034
5414
|
*/
|
|
6035
5415
|
static readonly minFillLevel = 0;
|
|
6036
5416
|
}
|
|
6037
|
-
/**
|
|
6038
|
-
* @beta
|
|
6039
|
-
* Contains an interface for defining the state of a property
|
|
6040
|
-
* for a {@link BlockPermutation}.
|
|
6041
|
-
*/
|
|
6042
|
-
export class IBlockProperty {
|
|
6043
|
-
protected constructor();
|
|
6044
|
-
/**
|
|
6045
|
-
* The name of this property.
|
|
6046
|
-
*/
|
|
6047
|
-
readonly name: string;
|
|
6048
|
-
}
|
|
6049
5417
|
/**
|
|
6050
5418
|
* @beta
|
|
6051
5419
|
* Base interface that defines components associated with an
|
|
@@ -6058,141 +5426,17 @@ export class IEntityComponent {
|
|
|
6058
5426
|
*/
|
|
6059
5427
|
readonly typeId: string;
|
|
6060
5428
|
}
|
|
6061
|
-
/**
|
|
6062
|
-
* @beta
|
|
6063
|
-
* Contains the state of an integer-based property for a {@link
|
|
6064
|
-
* BlockPermutation}.
|
|
6065
|
-
*/
|
|
6066
|
-
export class IntBlockProperty extends IBlockProperty {
|
|
6067
|
-
protected constructor();
|
|
6068
|
-
/**
|
|
6069
|
-
* The name of this property.
|
|
6070
|
-
*/
|
|
6071
|
-
readonly name: string;
|
|
6072
|
-
/**
|
|
6073
|
-
* The current value of this property.
|
|
6074
|
-
* @throws
|
|
6075
|
-
* Setting this property can throw if the value passed is not
|
|
6076
|
-
* valid for the property. Use {@link
|
|
6077
|
-
* @minecraft/server.IntBlockProperty.validValues} to check
|
|
6078
|
-
* allowed values.
|
|
6079
|
-
*/
|
|
6080
|
-
value: number;
|
|
6081
|
-
getValidValues(): number[];
|
|
6082
|
-
}
|
|
6083
|
-
/**
|
|
6084
|
-
* @beta
|
|
6085
|
-
* Represents a container that can hold stacks of items. Used
|
|
6086
|
-
* for entities like players, chest minecarts, llamas, and
|
|
6087
|
-
* more.
|
|
6088
|
-
*/
|
|
6089
5429
|
export class InventoryComponentContainer extends Container {
|
|
6090
5430
|
protected constructor();
|
|
6091
|
-
/**
|
|
6092
|
-
* The number of empty slots in the container.
|
|
6093
|
-
* @throws This property can throw when used.
|
|
6094
|
-
*/
|
|
6095
5431
|
readonly emptySlotsCount: number;
|
|
6096
|
-
/**
|
|
6097
|
-
* Represents the size of the container. For example, a
|
|
6098
|
-
* standard single-block chest has a size of 27, for the 27
|
|
6099
|
-
* slots in their inventory.
|
|
6100
|
-
* @throws This property can throw when used.
|
|
6101
|
-
*/
|
|
6102
5432
|
readonly size: number;
|
|
6103
|
-
/**
|
|
6104
|
-
* @remarks
|
|
6105
|
-
* Adds an item to the specified container. Items will be
|
|
6106
|
-
* placed in the first available empty slot. (Use {@link
|
|
6107
|
-
* InventoryComponentContainer.setItem} if you wish to set
|
|
6108
|
-
* items in a particular slot.)
|
|
6109
|
-
* @param itemStack
|
|
6110
|
-
* The stack of items to add.
|
|
6111
|
-
* @throws This function can throw errors.
|
|
6112
|
-
*/
|
|
6113
5433
|
addItem(itemStack: ItemStack): void;
|
|
6114
|
-
/**
|
|
6115
|
-
* @remarks
|
|
6116
|
-
* Empties all items in this entities' inventory.
|
|
6117
|
-
* @throws This function can throw errors.
|
|
6118
|
-
*/
|
|
6119
5434
|
clearAll(): void;
|
|
6120
|
-
/**
|
|
6121
|
-
* @remarks
|
|
6122
|
-
* Clears out a specific item at the specified slot index.
|
|
6123
|
-
* @param slot
|
|
6124
|
-
* @throws This function can throw errors.
|
|
6125
|
-
*/
|
|
6126
5435
|
clearItem(slot: number): void;
|
|
6127
|
-
/**
|
|
6128
|
-
* @remarks
|
|
6129
|
-
* Gets the item stack for the set of items at the specified
|
|
6130
|
-
* slot. If the slot is empty, returns undefined. This method
|
|
6131
|
-
* does not change or clear the contents of the specified slot.
|
|
6132
|
-
* @param slot
|
|
6133
|
-
* Zero-based index of the slot to retrieve items from.
|
|
6134
|
-
* @throws This function can throw errors.
|
|
6135
|
-
* @example getItem.js
|
|
6136
|
-
* ```typescript
|
|
6137
|
-
* const itemStack = rightChestContainer.getItem(0);
|
|
6138
|
-
* test.assert(itemStack.id === "apple", "Expected apple");
|
|
6139
|
-
* test.assert(itemStack.amount === 10, "Expected 10 apples");
|
|
6140
|
-
* ```
|
|
6141
|
-
*/
|
|
6142
5436
|
getItem(slot: number): ItemStack;
|
|
6143
|
-
/**
|
|
6144
|
-
* @remarks
|
|
6145
|
-
* Returns a slot object for specifically managing a slot
|
|
6146
|
-
* within a broader inventory.
|
|
6147
|
-
* @param slot
|
|
6148
|
-
* @throws This function can throw errors.
|
|
6149
|
-
*/
|
|
6150
5437
|
getSlot(slot: number): ContainerSlot;
|
|
6151
|
-
/**
|
|
6152
|
-
* @remarks
|
|
6153
|
-
* Sets an item stack within a particular slot.
|
|
6154
|
-
* @param slot
|
|
6155
|
-
* Zero-based index of the slot to set an item at.
|
|
6156
|
-
* @param itemStack
|
|
6157
|
-
* Stack of items to place within the specified slot.
|
|
6158
|
-
* @throws This function can throw errors.
|
|
6159
|
-
*/
|
|
6160
5438
|
setItem(slot: number, itemStack?: ItemStack): void;
|
|
6161
|
-
/**
|
|
6162
|
-
* @remarks
|
|
6163
|
-
* Swaps items between two different slots within containers.
|
|
6164
|
-
* @param slot
|
|
6165
|
-
* Zero-based index of the slot to swap from this container.
|
|
6166
|
-
* @param otherSlot
|
|
6167
|
-
* Zero-based index of the slot to swap with.
|
|
6168
|
-
* @param otherContainer
|
|
6169
|
-
* Target container to swap with. Note this can be the same
|
|
6170
|
-
* container as this source.
|
|
6171
|
-
* @throws This function can throw errors.
|
|
6172
|
-
* @example swapItems.js
|
|
6173
|
-
* ```typescript
|
|
6174
|
-
* rightChestContainer.swapItems(1, 0, leftChestContainer); // swap the cake and emerald
|
|
6175
|
-
*
|
|
6176
|
-
* ```
|
|
6177
|
-
*/
|
|
6178
5439
|
swapItems(slot: number, otherSlot: number, otherContainer: Container): boolean;
|
|
6179
|
-
/**
|
|
6180
|
-
* @remarks
|
|
6181
|
-
* Moves an item from one slot to another, potentially across
|
|
6182
|
-
* containers.
|
|
6183
|
-
* @param fromSlot
|
|
6184
|
-
* @param toSlot
|
|
6185
|
-
* Zero-based index of the slot to move to.
|
|
6186
|
-
* @param toContainer
|
|
6187
|
-
* Target container to transfer to. Note this can be the same
|
|
6188
|
-
* container as the source.
|
|
6189
|
-
* @throws This function can throw errors.
|
|
6190
|
-
* @example transferItem.js
|
|
6191
|
-
* ```typescript
|
|
6192
|
-
* rightChestContainer.transferItem(0, 4, chestCartContainer); // transfer the apple from the right chest to a chest cart
|
|
6193
|
-
*
|
|
6194
|
-
* ```
|
|
6195
|
-
*/
|
|
6196
5440
|
transferItem(fromSlot: number, toSlot: number, toContainer: Container): boolean;
|
|
6197
5441
|
}
|
|
6198
5442
|
/**
|
|
@@ -6482,17 +5726,44 @@ export class Items {
|
|
|
6482
5726
|
export class ItemStack {
|
|
6483
5727
|
/**
|
|
6484
5728
|
* Number of the items in the stack. Valid values range between
|
|
6485
|
-
*
|
|
5729
|
+
* 1-255. The provided value will be clamped to the item's
|
|
5730
|
+
* maximum stack size.
|
|
5731
|
+
* @throws
|
|
5732
|
+
* Throws if the value is outside the range of 1-255.
|
|
6486
5733
|
*/
|
|
6487
5734
|
amount: number;
|
|
5735
|
+
/**
|
|
5736
|
+
* Returns whether the item is stackable. An item is considered
|
|
5737
|
+
* stackable if the item's maximum stack size is greater than 1
|
|
5738
|
+
* and the item does not contain any custom data or properties.
|
|
5739
|
+
*/
|
|
6488
5740
|
readonly isStackable: boolean;
|
|
5741
|
+
/**
|
|
5742
|
+
* Gets or sets whether the item is kept on death.
|
|
5743
|
+
*/
|
|
6489
5744
|
keepOnDeath: boolean;
|
|
5745
|
+
/**
|
|
5746
|
+
* Gets or sets the item's lock mode. The default value is
|
|
5747
|
+
* `ItemLockMode.none`.
|
|
5748
|
+
*/
|
|
6490
5749
|
lockMode: ItemLockMode;
|
|
5750
|
+
/**
|
|
5751
|
+
* The maximum stack size. This value varies depending on the
|
|
5752
|
+
* type of item. For example, torches have a maximum stack size
|
|
5753
|
+
* of 64, while eggs have a maximum stack size of 16.
|
|
5754
|
+
*/
|
|
6491
5755
|
readonly maxAmount: number;
|
|
6492
5756
|
/**
|
|
6493
|
-
* Given name of this stack of items.
|
|
5757
|
+
* Given name of this stack of items. The name tag is displayed
|
|
5758
|
+
* when hovering over the item. Setting the name tag to an
|
|
5759
|
+
* empty string or `undefined` will remove the name tag.
|
|
5760
|
+
* @throws
|
|
5761
|
+
* Throws if the length exceeds 255 characters.
|
|
6494
5762
|
*/
|
|
6495
5763
|
nameTag?: string;
|
|
5764
|
+
/**
|
|
5765
|
+
* The type of the item.
|
|
5766
|
+
*/
|
|
6496
5767
|
readonly 'type': ItemType;
|
|
6497
5768
|
/**
|
|
6498
5769
|
* Identifier of the type of items for the stack. If a
|
|
@@ -6509,11 +5780,20 @@ export class ItemStack {
|
|
|
6509
5780
|
* enumeration for a list of standard item types in Minecraft
|
|
6510
5781
|
* experiences.
|
|
6511
5782
|
* @param amount
|
|
6512
|
-
* Number of items to place in the stack, between 1
|
|
6513
|
-
*
|
|
6514
|
-
*
|
|
5783
|
+
* Number of items to place in the stack, between 1-255. The
|
|
5784
|
+
* provided value will be clamped to the item's maximum stack
|
|
5785
|
+
* size. Note that certain items can only have one item in the
|
|
5786
|
+
* stack.
|
|
5787
|
+
* @throws
|
|
5788
|
+
* Throws if `itemType` is invalid, or if `amount` is outside
|
|
5789
|
+
* the range of 1-255.
|
|
6515
5790
|
*/
|
|
6516
5791
|
constructor(itemType: ItemType | string, amount?: number);
|
|
5792
|
+
/**
|
|
5793
|
+
* @remarks
|
|
5794
|
+
* Creates an exact copy of the item stack, including any
|
|
5795
|
+
* custom data or properties.
|
|
5796
|
+
*/
|
|
6517
5797
|
clone(): ItemStack;
|
|
6518
5798
|
/**
|
|
6519
5799
|
* @remarks
|
|
@@ -6524,6 +5804,14 @@ export class ItemStack {
|
|
|
6524
5804
|
* retrieve. If no namespace prefix is specified, 'minecraft:'
|
|
6525
5805
|
* is assumed. If the component is not present on the item
|
|
6526
5806
|
* stack, undefined is returned.
|
|
5807
|
+
* @example durability.ts
|
|
5808
|
+
* ```typescript
|
|
5809
|
+
* // Get the maximum durability of a custom sword item
|
|
5810
|
+
* const itemStack = new ItemStack("custom:sword");
|
|
5811
|
+
* const durability = itemStack.getComponent("minecraft:durability") as ItemDurabilityComponent;
|
|
5812
|
+
* const maxDurability = durability.maxDurability;
|
|
5813
|
+
*
|
|
5814
|
+
* ```
|
|
6527
5815
|
*/
|
|
6528
5816
|
getComponent(componentId: string): any;
|
|
6529
5817
|
/**
|
|
@@ -6536,6 +5824,9 @@ export class ItemStack {
|
|
|
6536
5824
|
* @remarks
|
|
6537
5825
|
* Returns the lore value - a secondary display string - for an
|
|
6538
5826
|
* ItemStack.
|
|
5827
|
+
* @returns
|
|
5828
|
+
* An array of lore strings. If the item does not have lore,
|
|
5829
|
+
* returns an empty array.
|
|
6539
5830
|
*/
|
|
6540
5831
|
getLore(): string[];
|
|
6541
5832
|
/**
|
|
@@ -6548,14 +5839,63 @@ export class ItemStack {
|
|
|
6548
5839
|
* is assumed.
|
|
6549
5840
|
*/
|
|
6550
5841
|
hasComponent(componentId: string): boolean;
|
|
5842
|
+
/**
|
|
5843
|
+
* @remarks
|
|
5844
|
+
* Returns whether this item stack can be stacked with the
|
|
5845
|
+
* given `itemStack`. This is determined by comparing the item
|
|
5846
|
+
* type and any custom data and properties associated with the
|
|
5847
|
+
* item stacks. The amount of each item stack is not taken into
|
|
5848
|
+
* consideration.
|
|
5849
|
+
* @param itemStack
|
|
5850
|
+
*/
|
|
6551
5851
|
isStackableWith(itemStack: ItemStack): boolean;
|
|
5852
|
+
/**
|
|
5853
|
+
* @remarks
|
|
5854
|
+
* The list of block types this item can break in Adventure
|
|
5855
|
+
* mode. The block names are displayed in the item's tooltip.
|
|
5856
|
+
* Setting the value to undefined will clear the list.
|
|
5857
|
+
* @param blockIdentifiers
|
|
5858
|
+
* @throws
|
|
5859
|
+
* Throws if any of the provided block identifiers are invalid.
|
|
5860
|
+
* @example example.ts
|
|
5861
|
+
* ```typescript
|
|
5862
|
+
* // Creates a diamond pickaxe that can destroy cobblestone and obsidian
|
|
5863
|
+
* const specialPickaxe = new ItemStack("minecraft:diamond_pickaxe");
|
|
5864
|
+
* specialPickaxe.setCanDestroy(["minecraft:cobblestone", "minecraft:obsidian"]);
|
|
5865
|
+
*
|
|
5866
|
+
* ```
|
|
5867
|
+
*/
|
|
6552
5868
|
setCanDestroy(blockIdentifiers?: string[]): void;
|
|
5869
|
+
/**
|
|
5870
|
+
* @remarks
|
|
5871
|
+
* The list of block types this item can be placed on in
|
|
5872
|
+
* Adventure mode. This is only applicable to block items. The
|
|
5873
|
+
* block names are displayed in the item's tooltip. Setting the
|
|
5874
|
+
* value to undefined will clear the list.
|
|
5875
|
+
* @param blockIdentifiers
|
|
5876
|
+
* @throws
|
|
5877
|
+
* Throws if any of the provided block identifiers are invalid.
|
|
5878
|
+
* @example example.ts
|
|
5879
|
+
* ```typescript
|
|
5880
|
+
* // Creates a gold block that can be placed on grass and dirt
|
|
5881
|
+
* const specialGoldBlock = new ItemStack("minecraft:gold_block");
|
|
5882
|
+
* specialPickaxe.setCanPlaceOn(["minecraft:grass", "minecraft:dirt"]);
|
|
5883
|
+
*
|
|
5884
|
+
* ```
|
|
5885
|
+
*/
|
|
6553
5886
|
setCanPlaceOn(blockIdentifiers?: string[]): void;
|
|
6554
5887
|
/**
|
|
6555
5888
|
* @remarks
|
|
6556
5889
|
* Sets the lore value - a secondary display string - for an
|
|
6557
5890
|
* ItemStack.
|
|
6558
5891
|
* @param loreList
|
|
5892
|
+
* @example multilineLore.ts
|
|
5893
|
+
* ```typescript
|
|
5894
|
+
* // Set the lore of an item to multiple lines of text
|
|
5895
|
+
* const itemStack = new ItemStack("minecraft:diamond_sword");
|
|
5896
|
+
* itemStack.setLore(["Line 1", "Line 2", "Line 3"]);
|
|
5897
|
+
*
|
|
5898
|
+
* ```
|
|
6559
5899
|
*/
|
|
6560
5900
|
setLore(loreList?: string[]): void;
|
|
6561
5901
|
/**
|
|
@@ -7627,6 +6967,7 @@ export class MinecraftBlockTypes {
|
|
|
7627
6967
|
* Represents a dead bush within Minecraft.
|
|
7628
6968
|
*/
|
|
7629
6969
|
static readonly deadbush: BlockType;
|
|
6970
|
+
static readonly decoratedPot: BlockType;
|
|
7630
6971
|
/**
|
|
7631
6972
|
* Represents a block of deepslate within Minecraft.
|
|
7632
6973
|
*/
|
|
@@ -9668,6 +9009,7 @@ export class MinecraftBlockTypes {
|
|
|
9668
9009
|
* Represents a structure void within Minecraft.
|
|
9669
9010
|
*/
|
|
9670
9011
|
static readonly structureVoid: BlockType;
|
|
9012
|
+
static readonly suspiciousSand: BlockType;
|
|
9671
9013
|
/**
|
|
9672
9014
|
* Represents a sweet berry bush within Minecraft.
|
|
9673
9015
|
*/
|
|
@@ -9692,6 +9034,8 @@ export class MinecraftBlockTypes {
|
|
|
9692
9034
|
* Represents a torch within Minecraft.
|
|
9693
9035
|
*/
|
|
9694
9036
|
static readonly torch: BlockType;
|
|
9037
|
+
static readonly torchflower: BlockType;
|
|
9038
|
+
static readonly torchflowerCrop: BlockType;
|
|
9695
9039
|
/**
|
|
9696
9040
|
* Represents a trapdoor within Minecraft.
|
|
9697
9041
|
*/
|
|
@@ -10975,7 +10319,6 @@ export class MinecraftItemTypes {
|
|
|
10975
10319
|
* Minecraft.
|
|
10976
10320
|
*/
|
|
10977
10321
|
static readonly deadbush: ItemType;
|
|
10978
|
-
static readonly debugStick: ItemType;
|
|
10979
10322
|
/**
|
|
10980
10323
|
* Represents an item that can place a block of deepslate
|
|
10981
10324
|
* within Minecraft.
|
|
@@ -13343,6 +12686,47 @@ export class Player extends Entity {
|
|
|
13343
12686
|
* @throws This function can throw errors.
|
|
13344
12687
|
*/
|
|
13345
12688
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
12689
|
+
/**
|
|
12690
|
+
* @beta
|
|
12691
|
+
* @remarks
|
|
12692
|
+
* Sends a message to the player.
|
|
12693
|
+
* @param message
|
|
12694
|
+
* The message to be displayed.
|
|
12695
|
+
* @throws
|
|
12696
|
+
* This method can throw if the provided {@link RawMessage} is
|
|
12697
|
+
* in an invalid format. For example, if an empty `name` string
|
|
12698
|
+
* is provided to `score`.
|
|
12699
|
+
* @example nestedTranslation.ts
|
|
12700
|
+
* ```typescript
|
|
12701
|
+
* // Displays "Apple or Coal"
|
|
12702
|
+
* let rawMessage = {
|
|
12703
|
+
* translate: "accessibility.list.or.two",
|
|
12704
|
+
* with: { rawtext: [{ translate: "item.apple.name" }, { translate: "item.coal.name" }] },
|
|
12705
|
+
* };
|
|
12706
|
+
* player.sendMessage(rawMessage);
|
|
12707
|
+
*
|
|
12708
|
+
* ```
|
|
12709
|
+
* @example scoreWildcard.ts
|
|
12710
|
+
* ```typescript
|
|
12711
|
+
* // Displays the player's score for objective "obj". Each player will see their own score.
|
|
12712
|
+
* const rawMessage = { score: { name: "*", objective: "obj" } };
|
|
12713
|
+
* world.sendMessage(rawMessage);
|
|
12714
|
+
*
|
|
12715
|
+
* ```
|
|
12716
|
+
* @example simpleString.ts
|
|
12717
|
+
* ```typescript
|
|
12718
|
+
* // Displays "Hello, world!"
|
|
12719
|
+
* world.sendMessage("Hello, world!");
|
|
12720
|
+
*
|
|
12721
|
+
* ```
|
|
12722
|
+
* @example translation.ts
|
|
12723
|
+
* ```typescript
|
|
12724
|
+
* // Displays "First or Second"
|
|
12725
|
+
* const rawMessage = { translate: "accessibility.list.or.two", with: ["First", "Second"] };
|
|
12726
|
+
* player.sendMessage(rawMessage);
|
|
12727
|
+
*
|
|
12728
|
+
* ```
|
|
12729
|
+
*/
|
|
13346
12730
|
sendMessage(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
13347
12731
|
/**
|
|
13348
12732
|
* @beta
|
|
@@ -13438,100 +12822,17 @@ export class Player extends Entity {
|
|
|
13438
12822
|
*/
|
|
13439
12823
|
triggerEvent(eventName: string): void;
|
|
13440
12824
|
}
|
|
13441
|
-
/**
|
|
13442
|
-
* @beta
|
|
13443
|
-
* Represents the inventory of a {@link Player} in the world.
|
|
13444
|
-
*/
|
|
13445
12825
|
export class PlayerInventoryComponentContainer extends InventoryComponentContainer {
|
|
13446
12826
|
protected constructor();
|
|
13447
|
-
/**
|
|
13448
|
-
* Contains a count of the slots in the container that are
|
|
13449
|
-
* empty.
|
|
13450
|
-
* @throws This property can throw when used.
|
|
13451
|
-
*/
|
|
13452
12827
|
readonly emptySlotsCount: number;
|
|
13453
|
-
/**
|
|
13454
|
-
* Returns the size capacity of the inventory container on this
|
|
13455
|
-
* block.
|
|
13456
|
-
* @throws This property can throw when used.
|
|
13457
|
-
*/
|
|
13458
12828
|
readonly size: number;
|
|
13459
|
-
/**
|
|
13460
|
-
* @remarks
|
|
13461
|
-
* Adds an item to the specified container. Item will be placed
|
|
13462
|
-
* in the first available empty slot. (use .setItem if you wish
|
|
13463
|
-
* to set items in a particular slot.)
|
|
13464
|
-
* @param itemStack
|
|
13465
|
-
* The stack of items to add.
|
|
13466
|
-
* @throws This function can throw errors.
|
|
13467
|
-
*/
|
|
13468
12829
|
addItem(itemStack: ItemStack): void;
|
|
13469
|
-
/**
|
|
13470
|
-
* @remarks
|
|
13471
|
-
* Empties all items in this players' inventory.
|
|
13472
|
-
* @throws This function can throw errors.
|
|
13473
|
-
*/
|
|
13474
12830
|
clearAll(): void;
|
|
13475
|
-
/**
|
|
13476
|
-
* @remarks
|
|
13477
|
-
* Clears out a specific item at the specified slot index.
|
|
13478
|
-
* @param slot
|
|
13479
|
-
* @throws This function can throw errors.
|
|
13480
|
-
*/
|
|
13481
12831
|
clearItem(slot: number): void;
|
|
13482
|
-
/**
|
|
13483
|
-
* @remarks
|
|
13484
|
-
* Gets the item stack for the set of items at the specified
|
|
13485
|
-
* slot. If the slot is empty, returns undefined. This method
|
|
13486
|
-
* does not change or clear the contents of the specified slot.
|
|
13487
|
-
* @param slot
|
|
13488
|
-
* Zero-based index of the slot to retrieve items from.
|
|
13489
|
-
* @throws This function can throw errors.
|
|
13490
|
-
*/
|
|
13491
12832
|
getItem(slot: number): ItemStack;
|
|
13492
|
-
/**
|
|
13493
|
-
* @remarks
|
|
13494
|
-
* Returns a slot object for specifically managing a slot
|
|
13495
|
-
* within a broader inventory.
|
|
13496
|
-
* @param slot
|
|
13497
|
-
* @throws This function can throw errors.
|
|
13498
|
-
*/
|
|
13499
12833
|
getSlot(slot: number): ContainerSlot;
|
|
13500
|
-
/**
|
|
13501
|
-
* @remarks
|
|
13502
|
-
* Sets an item stack within a particular slot.
|
|
13503
|
-
* @param slot
|
|
13504
|
-
* Zero-based index of the slot to set an item at.
|
|
13505
|
-
* @param itemStack
|
|
13506
|
-
* Stack of items to place within the specified slot.
|
|
13507
|
-
* @throws This function can throw errors.
|
|
13508
|
-
*/
|
|
13509
12834
|
setItem(slot: number, itemStack?: ItemStack): void;
|
|
13510
|
-
/**
|
|
13511
|
-
* @remarks
|
|
13512
|
-
* Swaps items between two different slots within containers.
|
|
13513
|
-
* @param slot
|
|
13514
|
-
* Zero-based index of the slot to swap from this container.
|
|
13515
|
-
* @param otherSlot
|
|
13516
|
-
* Zero-based index of the slot to swap with.
|
|
13517
|
-
* @param otherContainer
|
|
13518
|
-
* Target container to swap with. Note this can be the same
|
|
13519
|
-
* container as this source.
|
|
13520
|
-
* @throws This function can throw errors.
|
|
13521
|
-
*/
|
|
13522
12835
|
swapItems(slot: number, otherSlot: number, otherContainer: Container): boolean;
|
|
13523
|
-
/**
|
|
13524
|
-
* @remarks
|
|
13525
|
-
* Moves an item from one slot to another, potentially across
|
|
13526
|
-
* containers.
|
|
13527
|
-
* @param fromSlot
|
|
13528
|
-
* @param toSlot
|
|
13529
|
-
* Zero-based index of the slot to move to.
|
|
13530
|
-
* @param toContainer
|
|
13531
|
-
* Target container to transfer to. Note this can be the same
|
|
13532
|
-
* container as the source.
|
|
13533
|
-
* @throws This function can throw errors.
|
|
13534
|
-
*/
|
|
13535
12836
|
transferItem(fromSlot: number, toSlot: number, toContainer: Container): boolean;
|
|
13536
12837
|
}
|
|
13537
12838
|
/**
|
|
@@ -14032,28 +13333,6 @@ export class ServerMessageSignal {
|
|
|
14032
13333
|
*/
|
|
14033
13334
|
unsubscribe(callback: (arg: MessageReceiveEvent) => void): void;
|
|
14034
13335
|
}
|
|
14035
|
-
/**
|
|
14036
|
-
* @beta
|
|
14037
|
-
* Contains the state of a string-based property for a {@link
|
|
14038
|
-
* BlockPermutation}.
|
|
14039
|
-
*/
|
|
14040
|
-
export class StringBlockProperty extends IBlockProperty {
|
|
14041
|
-
protected constructor();
|
|
14042
|
-
/**
|
|
14043
|
-
* Name of this property.
|
|
14044
|
-
*/
|
|
14045
|
-
readonly name: string;
|
|
14046
|
-
/**
|
|
14047
|
-
* The current value of this property.
|
|
14048
|
-
* @throws
|
|
14049
|
-
* Setting this property can throw if the value passed is not
|
|
14050
|
-
* valid for the property. Use {@link
|
|
14051
|
-
* @minecraft/server.StringBlockProperty.validValues} to check
|
|
14052
|
-
* allowed values.
|
|
14053
|
-
*/
|
|
14054
|
-
value: string;
|
|
14055
|
-
getValidValues(): string[];
|
|
14056
|
-
}
|
|
14057
13336
|
/**
|
|
14058
13337
|
* A class that provides system-level events and functions.
|
|
14059
13338
|
*/
|
|
@@ -14428,10 +13707,13 @@ export class World {
|
|
|
14428
13707
|
/**
|
|
14429
13708
|
* @beta
|
|
14430
13709
|
* @remarks
|
|
14431
|
-
* Returns
|
|
13710
|
+
* Returns a set of players based on a set of conditions
|
|
13711
|
+
* defined via the EntityQueryOptions set of filter criteria.
|
|
14432
13712
|
* @param options
|
|
13713
|
+
* Additional options that can be used to filter the set of
|
|
13714
|
+
* players returned.
|
|
14433
13715
|
* @returns
|
|
14434
|
-
*
|
|
13716
|
+
* A player array.
|
|
14435
13717
|
* @throws This function can throw errors.
|
|
14436
13718
|
*/
|
|
14437
13719
|
getPlayers(options?: EntityQueryOptions): PlayerIterator;
|
|
@@ -14474,6 +13756,47 @@ export class World {
|
|
|
14474
13756
|
* @throws This function can throw errors.
|
|
14475
13757
|
*/
|
|
14476
13758
|
removeDynamicProperty(identifier: string): boolean;
|
|
13759
|
+
/**
|
|
13760
|
+
* @beta
|
|
13761
|
+
* @remarks
|
|
13762
|
+
* Sends a message to all players.
|
|
13763
|
+
* @param message
|
|
13764
|
+
* The message to be displayed.
|
|
13765
|
+
* @throws
|
|
13766
|
+
* This method can throw if the provided {@link RawMessage} is
|
|
13767
|
+
* in an invalid format. For example, if an empty `name` string
|
|
13768
|
+
* is provided to `score`.
|
|
13769
|
+
* @example nestedTranslation.ts
|
|
13770
|
+
* ```typescript
|
|
13771
|
+
* // Displays "Apple or Coal"
|
|
13772
|
+
* let rawMessage = {
|
|
13773
|
+
* translate: "accessibility.list.or.two",
|
|
13774
|
+
* with: { rawtext: [{ translate: "item.apple.name" }, { translate: "item.coal.name" }] },
|
|
13775
|
+
* };
|
|
13776
|
+
* world.sendMessage(rawMessage);
|
|
13777
|
+
*
|
|
13778
|
+
* ```
|
|
13779
|
+
* @example scoreWildcard.ts
|
|
13780
|
+
* ```typescript
|
|
13781
|
+
* // Displays the player's score for objective "obj". Each player will see their own score.
|
|
13782
|
+
* const rawMessage = { score: { name: "*", objective: "obj" } };
|
|
13783
|
+
* world.sendMessage(rawMessage);
|
|
13784
|
+
*
|
|
13785
|
+
* ```
|
|
13786
|
+
* @example simpleString.ts
|
|
13787
|
+
* ```typescript
|
|
13788
|
+
* // Displays "Hello, world!"
|
|
13789
|
+
* world.sendMessage("Hello, world!");
|
|
13790
|
+
*
|
|
13791
|
+
* ```
|
|
13792
|
+
* @example translation.ts
|
|
13793
|
+
* ```typescript
|
|
13794
|
+
* // Displays "First or Second"
|
|
13795
|
+
* const rawMessage = { translate: "accessibility.list.or.two", with: ["First", "Second"] };
|
|
13796
|
+
* world.sendMessage(rawMessage);
|
|
13797
|
+
*
|
|
13798
|
+
* ```
|
|
13799
|
+
*/
|
|
14477
13800
|
sendMessage(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
14478
13801
|
setDefaultSpawn(spawnPosition: Vector3): void;
|
|
14479
13802
|
/**
|