@minecraft/server 1.2.0-rc.1.20.0-preview.22 → 1.2.0-rc.1.20.0-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.
Files changed (2) hide show
  1. package/index.d.ts +758 -6
  2. 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.3.0-internal.1.20.0-preview.22"
19
+ * "version": "1.3.0-internal.1.20.0-preview.23"
20
20
  * }
21
21
  * ```
22
22
  *
@@ -184,6 +184,13 @@ export class BlockInventoryComponent {
184
184
  * @throws This property can throw when used.
185
185
  */
186
186
  readonly container: Container;
187
+ /**
188
+ * @remarks
189
+ * Identifier of this component. Should always be
190
+ * minecraft:inventory.
191
+ *
192
+ */
193
+ static readonly componentId = 'minecraft:inventory';
187
194
  }
188
195
 
189
196
  /**
@@ -233,6 +240,20 @@ export class CommandResult {
233
240
  readonly successCount: number;
234
241
  }
235
242
 
243
+ /**
244
+ * @beta
245
+ * Base class for downstream Component implementations.
246
+ */
247
+ export class Component {
248
+ protected constructor();
249
+ /**
250
+ * @remarks
251
+ * Identifier of the component.
252
+ *
253
+ */
254
+ readonly typeId: string;
255
+ }
256
+
236
257
  /**
237
258
  * @beta
238
259
  * Represents a container that can hold sets of items. Used
@@ -420,8 +441,7 @@ export class Dimension {
420
441
  /**
421
442
  * @beta
422
443
  * @remarks
423
- * Returns a block instance at the given location. This method
424
- * was introduced as of version 1.17.10.21.
444
+ * Returns a block instance at the given location.
425
445
  *
426
446
  * @param location
427
447
  * The location at which to return a block.
@@ -634,6 +654,27 @@ export class Entity {
634
654
  * @throws This function can throw errors.
635
655
  */
636
656
  clearVelocity(): void;
657
+ /**
658
+ * @beta
659
+ * @remarks
660
+ * Gets a component (that represents additional capabilities)
661
+ * for an entity.
662
+ *
663
+ * @param componentId
664
+ * The identifier of the component (e.g., 'minecraft:rideable')
665
+ * to retrieve. If no namespace prefix is specified,
666
+ * 'minecraft:' is assumed. If the component is not present on
667
+ * the entity, undefined is returned.
668
+ */
669
+ getComponent(componentId: string): EntityComponent | undefined;
670
+ /**
671
+ * @beta
672
+ * @remarks
673
+ * Returns all components that are both present on this entity
674
+ * and supported by the API.
675
+ *
676
+ */
677
+ getComponents(): EntityComponent[];
637
678
  /**
638
679
  * @beta
639
680
  * @remarks
@@ -667,6 +708,18 @@ export class Entity {
667
708
  * @throws This function can throw errors.
668
709
  */
669
710
  getViewDirection(): Vector3;
711
+ /**
712
+ * @beta
713
+ * @remarks
714
+ * Returns true if the specified component is present on this
715
+ * entity.
716
+ *
717
+ * @param componentId
718
+ * The identifier of the component (e.g., 'minecraft:rideable')
719
+ * to retrieve. If no namespace prefix is specified,
720
+ * 'minecraft:' is assumed.
721
+ */
722
+ hasComponent(componentId: string): boolean;
670
723
  /**
671
724
  * @beta
672
725
  * @remarks
@@ -705,6 +758,8 @@ export class Entity {
705
758
  /**
706
759
  * @beta
707
760
  * @remarks
761
+ * Runs a synchronous command on the entity.
762
+ *
708
763
  * This function can't be called in read-only mode.
709
764
  *
710
765
  * @throws This function can throw errors.
@@ -727,11 +782,195 @@ export class Entity {
727
782
  runCommandAsync(commandString: string): Promise<CommandResult>;
728
783
  }
729
784
 
785
+ /**
786
+ * @beta
787
+ * Base class for a family of entity movement events.
788
+ */
789
+ export class EntityBaseMovementComponent extends EntityComponent {
790
+ protected constructor();
791
+ readonly maxTurn: number;
792
+ }
793
+
794
+ /**
795
+ * @beta
796
+ * When added, this component signifies that the entity can
797
+ * climb up ladders.
798
+ */
799
+ export class EntityCanClimbComponent extends EntityComponent {
800
+ protected constructor();
801
+ /**
802
+ * @remarks
803
+ * Identifier of this component. Should always be
804
+ * minecraft:can_climb.
805
+ *
806
+ */
807
+ static readonly componentId = 'minecraft:can_climb';
808
+ }
809
+
810
+ /**
811
+ * @beta
812
+ * When added, this component signifies that the entity can
813
+ * fly, and the pathfinder won't be restricted to paths where a
814
+ * solid block is required underneath it.
815
+ */
816
+ export class EntityCanFlyComponent extends EntityComponent {
817
+ protected constructor();
818
+ /**
819
+ * @remarks
820
+ * Identifier of this component. Should always be
821
+ * minecraft:can_fly.
822
+ *
823
+ */
824
+ static readonly componentId = 'minecraft:can_fly';
825
+ }
826
+
827
+ /**
828
+ * @beta
829
+ * When added, this component signifies that the entity can
830
+ * power jump like the horse does within Minecraft.
831
+ */
832
+ export class EntityCanPowerJumpComponent extends EntityComponent {
833
+ protected constructor();
834
+ /**
835
+ * @remarks
836
+ * Identifier of this component. Should always be
837
+ * minecraft:can_power_jump.
838
+ *
839
+ */
840
+ static readonly componentId = 'minecraft:can_power_jump';
841
+ }
842
+
843
+ /**
844
+ * @beta
845
+ * Defines the entity's color. Only works on certain entities
846
+ * that have predefined color values (sheep, llama, shulker).
847
+ */
848
+ export class EntityColorComponent extends EntityComponent {
849
+ protected constructor();
850
+ /**
851
+ * @remarks
852
+ * This property can't be edited in read-only mode.
853
+ *
854
+ */
855
+ value: number;
856
+ /**
857
+ * @remarks
858
+ * Identifier of this component. Should always be
859
+ * minecraft:color.
860
+ *
861
+ */
862
+ static readonly componentId = 'minecraft:color';
863
+ }
864
+
865
+ /**
866
+ * @beta
867
+ * Base class for downstream entity components.
868
+ */
869
+ export class EntityComponent extends Component {
870
+ protected constructor();
871
+ }
872
+
873
+ /**
874
+ * @beta
875
+ * When added, this component signifies that this entity
876
+ * doesn't take damage from fire.
877
+ */
878
+ export class EntityFireImmuneComponent extends EntityComponent {
879
+ protected constructor();
880
+ /**
881
+ * @remarks
882
+ * Identifier of this component. Should always be
883
+ * minecraft:fire_immune.
884
+ *
885
+ */
886
+ static readonly componentId = 'minecraft:fire_immune';
887
+ }
888
+
889
+ /**
890
+ * @beta
891
+ * When added, this component signifies that this entity can
892
+ * float in liquid blocks.
893
+ */
894
+ export class EntityFloatsInLiquidComponent extends EntityComponent {
895
+ protected constructor();
896
+ /**
897
+ * @remarks
898
+ * Identifier of this component. Should always be
899
+ * minecraft:floats_in_liquid.
900
+ *
901
+ */
902
+ static readonly componentId = 'minecraft:floats_in_liquid';
903
+ }
904
+
905
+ /**
906
+ * @beta
907
+ * Represents the flying speed of an entity.
908
+ */
909
+ export class EntityFlyingSpeedComponent extends EntityComponent {
910
+ protected constructor();
911
+ /**
912
+ * @remarks
913
+ * This property can't be edited in read-only mode.
914
+ *
915
+ */
916
+ value: number;
917
+ /**
918
+ * @remarks
919
+ * Identifier of this component. Should always be
920
+ * minecraft:flying_speed.
921
+ *
922
+ */
923
+ static readonly componentId = 'minecraft:flying_speed';
924
+ }
925
+
926
+ /**
927
+ * @beta
928
+ * Defines how much friction affects this entity.
929
+ */
930
+ export class EntityFrictionModifierComponent extends EntityComponent {
931
+ protected constructor();
932
+ /**
933
+ * @remarks
934
+ * This property can't be edited in read-only mode.
935
+ *
936
+ */
937
+ value: number;
938
+ /**
939
+ * @remarks
940
+ * Identifier of this component. Should always be
941
+ * minecraft:friction_modifier.
942
+ *
943
+ */
944
+ static readonly componentId = 'minecraft:friction_modifier';
945
+ }
946
+
947
+ /**
948
+ * @beta
949
+ * Sets the offset from the ground that the entity is actually
950
+ * at.
951
+ */
952
+ export class EntityGroundOffsetComponent extends EntityComponent {
953
+ protected constructor();
954
+ /**
955
+ * @remarks
956
+ * This property can't be edited in read-only mode.
957
+ *
958
+ */
959
+ value: number;
960
+ /**
961
+ * @remarks
962
+ * Identifier of this component. Should always be
963
+ * minecraft:ground_offset.
964
+ *
965
+ */
966
+ static readonly componentId = 'minecraft:ground_offset';
967
+ }
968
+
730
969
  /**
731
970
  * @beta
732
971
  * Defines this entity's inventory properties.
733
972
  */
734
- export class EntityInventoryComponent {
973
+ export class EntityInventoryComponent extends EntityComponent {
735
974
  protected constructor();
736
975
  /**
737
976
  * @remarks
@@ -785,6 +1024,221 @@ export class EntityInventoryComponent {
785
1024
  * @throws This property can throw when used.
786
1025
  */
787
1026
  readonly restrictToOwner: boolean;
1027
+ /**
1028
+ * @remarks
1029
+ * Identifier of this component. Should always be
1030
+ * minecraft:inventory.
1031
+ *
1032
+ */
1033
+ static readonly componentId = 'minecraft:inventory';
1034
+ }
1035
+
1036
+ /**
1037
+ * @beta
1038
+ * When added, this component signifies that this entity is a
1039
+ * baby.
1040
+ */
1041
+ export class EntityIsBabyComponent extends EntityComponent {
1042
+ protected constructor();
1043
+ /**
1044
+ * @remarks
1045
+ * Identifier of this component. Should always be
1046
+ * minecraft:is_baby.
1047
+ *
1048
+ */
1049
+ static readonly componentId = 'minecraft:is_baby';
1050
+ }
1051
+
1052
+ /**
1053
+ * @beta
1054
+ * When added, this component signifies that this entity is
1055
+ * charged.
1056
+ */
1057
+ export class EntityIsChargedComponent extends EntityComponent {
1058
+ protected constructor();
1059
+ /**
1060
+ * @remarks
1061
+ * Identifier of this component. Should always be
1062
+ * minecraft:is_charged.
1063
+ *
1064
+ */
1065
+ static readonly componentId = 'minecraft:is_charged';
1066
+ }
1067
+
1068
+ /**
1069
+ * @beta
1070
+ * When added, this component signifies that this entity is
1071
+ * currently carrying a chest.
1072
+ */
1073
+ export class EntityIsChestedComponent extends EntityComponent {
1074
+ protected constructor();
1075
+ /**
1076
+ * @remarks
1077
+ * Identifier of this component. Should always be
1078
+ * minecraft:is_chested.
1079
+ *
1080
+ */
1081
+ static readonly componentId = 'minecraft:is_chested';
1082
+ }
1083
+
1084
+ /**
1085
+ * @beta
1086
+ * When added, this component signifies that dyes can be used
1087
+ * on this entity to change its color.
1088
+ */
1089
+ export class EntityIsDyeableComponent extends EntityComponent {
1090
+ protected constructor();
1091
+ /**
1092
+ * @remarks
1093
+ * Identifier of this component. Should always be
1094
+ * minecraft:is_dyeable.
1095
+ *
1096
+ */
1097
+ static readonly componentId = 'minecraft:is_dyeable';
1098
+ }
1099
+
1100
+ /**
1101
+ * @beta
1102
+ * When added, this component signifies that this entity can
1103
+ * hide from hostile mobs while invisible.
1104
+ */
1105
+ export class EntityIsHiddenWhenInvisibleComponent extends EntityComponent {
1106
+ protected constructor();
1107
+ /**
1108
+ * @remarks
1109
+ * Identifier of this component. Should always be
1110
+ * minecraft:is_hidden_when_invisible.
1111
+ *
1112
+ */
1113
+ static readonly componentId = 'minecraft:is_hidden_when_invisible';
1114
+ }
1115
+
1116
+ /**
1117
+ * @beta
1118
+ * When added, this component signifies that this entity this
1119
+ * currently on fire.
1120
+ */
1121
+ export class EntityIsIgnitedComponent extends EntityComponent {
1122
+ protected constructor();
1123
+ /**
1124
+ * @remarks
1125
+ * Identifier of this component. Should always be
1126
+ * minecraft:is_ignited.
1127
+ *
1128
+ */
1129
+ static readonly componentId = 'minecraft:is_ignited';
1130
+ }
1131
+
1132
+ /**
1133
+ * @beta
1134
+ * When added, this component signifies that this entity is an
1135
+ * illager captain.
1136
+ */
1137
+ export class EntityIsIllagerCaptainComponent extends EntityComponent {
1138
+ protected constructor();
1139
+ /**
1140
+ * @remarks
1141
+ * Identifier of this component. Should always be
1142
+ * minecraft:is_illager_captain.
1143
+ *
1144
+ */
1145
+ static readonly componentId = 'minecraft:is_illager_captain';
1146
+ }
1147
+
1148
+ /**
1149
+ * @beta
1150
+ * When added, this component signifies that this entity is
1151
+ * currently saddled.
1152
+ */
1153
+ export class EntityIsSaddledComponent extends EntityComponent {
1154
+ protected constructor();
1155
+ /**
1156
+ * @remarks
1157
+ * Identifier of this component. Should always be
1158
+ * minecraft:is_saddled.
1159
+ *
1160
+ */
1161
+ static readonly componentId = 'minecraft:is_saddled';
1162
+ }
1163
+
1164
+ /**
1165
+ * @beta
1166
+ * When added, this component signifies that this entity is
1167
+ * currently shaking.
1168
+ */
1169
+ export class EntityIsShakingComponent extends EntityComponent {
1170
+ protected constructor();
1171
+ /**
1172
+ * @remarks
1173
+ * Identifier of this component. Should always be
1174
+ * minecraft:is_shaking.
1175
+ *
1176
+ */
1177
+ static readonly componentId = 'minecraft:is_shaking';
1178
+ }
1179
+
1180
+ /**
1181
+ * @beta
1182
+ * When added, this component signifies that this entity is
1183
+ * currently sheared.
1184
+ */
1185
+ export class EntityIsShearedComponent extends EntityComponent {
1186
+ protected constructor();
1187
+ /**
1188
+ * @remarks
1189
+ * Identifier of this component. Should always be
1190
+ * minecraft:is_sheared.
1191
+ *
1192
+ */
1193
+ static readonly componentId = 'minecraft:is_sheared';
1194
+ }
1195
+
1196
+ /**
1197
+ * @beta
1198
+ * When added, this component signifies that this entity can be
1199
+ * stacked.
1200
+ */
1201
+ export class EntityIsStackableComponent extends EntityComponent {
1202
+ protected constructor();
1203
+ /**
1204
+ * @remarks
1205
+ * Identifier of this component. Should always be
1206
+ * minecraft:is_stackable.
1207
+ *
1208
+ */
1209
+ static readonly componentId = 'minecraft:is_stackable';
1210
+ }
1211
+
1212
+ /**
1213
+ * @beta
1214
+ * When added, this component signifies that this entity is
1215
+ * currently stunned.
1216
+ */
1217
+ export class EntityIsStunnedComponent extends EntityComponent {
1218
+ protected constructor();
1219
+ /**
1220
+ * @remarks
1221
+ * Identifier of this component. Should always be
1222
+ * minecraft:is_stunned.
1223
+ *
1224
+ */
1225
+ static readonly componentId = 'minecraft:is_stunned';
1226
+ }
1227
+
1228
+ /**
1229
+ * @beta
1230
+ * When added, this component signifies that this entity is
1231
+ * currently tamed.
1232
+ */
1233
+ export class EntityIsTamedComponent extends EntityComponent {
1234
+ protected constructor();
1235
+ /**
1236
+ * @remarks
1237
+ * Identifier of this component. Should always be
1238
+ * minecraft:is_tamed.
1239
+ *
1240
+ */
1241
+ static readonly componentId = 'minecraft:is_tamed';
788
1242
  }
789
1243
 
790
1244
  /**
@@ -794,7 +1248,7 @@ export class EntityInventoryComponent {
794
1248
  * retrieve the actual item stack contents via the itemStack
795
1249
  * property.
796
1250
  */
797
- export class EntityItemComponent {
1251
+ export class EntityItemComponent extends EntityComponent {
798
1252
  protected constructor();
799
1253
  /**
800
1254
  * @remarks
@@ -803,13 +1257,247 @@ export class EntityItemComponent {
803
1257
  * @throws This property can throw when used.
804
1258
  */
805
1259
  readonly itemStack: ItemStack;
1260
+ /**
1261
+ * @remarks
1262
+ * Identifier of this component.
1263
+ *
1264
+ */
1265
+ static readonly componentId = 'minecraft:item';
1266
+ }
1267
+
1268
+ /**
1269
+ * @beta
1270
+ * Additional variant value. Can be used to further
1271
+ * differentiate variants.
1272
+ */
1273
+ export class EntityMarkVariantComponent extends EntityComponent {
1274
+ protected constructor();
1275
+ /**
1276
+ * @remarks
1277
+ * This property can't be edited in read-only mode.
1278
+ *
1279
+ */
1280
+ value: number;
1281
+ /**
1282
+ * @remarks
1283
+ * Identifier of this component. Should always be
1284
+ * minecraft:mark_variant.
1285
+ *
1286
+ */
1287
+ static readonly componentId = 'minecraft:mark_variant';
1288
+ }
1289
+
1290
+ /**
1291
+ * @beta
1292
+ * When added, this movement control allows the mob to swim in
1293
+ * water and walk on land.
1294
+ */
1295
+ export class EntityMovementAmphibiousComponent extends EntityBaseMovementComponent {
1296
+ protected constructor();
1297
+ /**
1298
+ * @remarks
1299
+ * Identifier of this component. Should always be
1300
+ * minecraft:movement.amphibious.
1301
+ *
1302
+ */
1303
+ static readonly componentId = 'minecraft:movement.amphibious';
1304
+ }
1305
+
1306
+ /**
1307
+ * @beta
1308
+ * This component accents the movement of an entity.
1309
+ */
1310
+ export class EntityMovementBasicComponent extends EntityBaseMovementComponent {
1311
+ protected constructor();
1312
+ /**
1313
+ * @remarks
1314
+ * Identifier of this component. Should always be
1315
+ * minecraft:movement.basic.
1316
+ *
1317
+ */
1318
+ static readonly componentId = 'minecraft:movement.basic';
1319
+ }
1320
+
1321
+ /**
1322
+ * @beta
1323
+ * When added, this move control causes the mob to fly.
1324
+ */
1325
+ export class EntityMovementFlyComponent extends EntityBaseMovementComponent {
1326
+ protected constructor();
1327
+ /**
1328
+ * @remarks
1329
+ * Identifier of this component. Should always be
1330
+ * minecraft:movement.fly.
1331
+ *
1332
+ */
1333
+ static readonly componentId = 'minecraft:movement.fly';
1334
+ }
1335
+
1336
+ /**
1337
+ * @beta
1338
+ * When added, this move control allows a mob to fly, swim,
1339
+ * climb, etc.
1340
+ */
1341
+ export class EntityMovementGenericComponent extends EntityBaseMovementComponent {
1342
+ protected constructor();
1343
+ /**
1344
+ * @remarks
1345
+ * Identifier of this component. Should always be
1346
+ * minecraft:movement.generic.
1347
+ *
1348
+ */
1349
+ static readonly componentId = 'minecraft:movement.generic';
1350
+ }
1351
+
1352
+ /**
1353
+ * @beta
1354
+ * When added, this move control causes the mob to hover.
1355
+ */
1356
+ export class EntityMovementHoverComponent extends EntityBaseMovementComponent {
1357
+ protected constructor();
1358
+ /**
1359
+ * @remarks
1360
+ * Identifier of this component. Should always be
1361
+ * minecraft:movement.hover.
1362
+ *
1363
+ */
1364
+ static readonly componentId = 'minecraft:movement.hover';
1365
+ }
1366
+
1367
+ /**
1368
+ * @beta
1369
+ * Move control that causes the mob to jump as it moves with a
1370
+ * specified delay between jumps.
1371
+ */
1372
+ export class EntityMovementJumpComponent extends EntityBaseMovementComponent {
1373
+ protected constructor();
1374
+ /**
1375
+ * @remarks
1376
+ * Identifier of this component. Should always be
1377
+ * minecraft:movement.jump.
1378
+ *
1379
+ */
1380
+ static readonly componentId = 'minecraft:movement.jump';
1381
+ }
1382
+
1383
+ /**
1384
+ * @beta
1385
+ * When added, this move control causes the mob to hop as it
1386
+ * moves.
1387
+ */
1388
+ export class EntityMovementSkipComponent extends EntityBaseMovementComponent {
1389
+ protected constructor();
1390
+ /**
1391
+ * @remarks
1392
+ * Identifier of this component. Should always be
1393
+ * minecraft:movement.skip.
1394
+ *
1395
+ */
1396
+ static readonly componentId = 'minecraft:movement.skip';
1397
+ }
1398
+
1399
+ /**
1400
+ * @beta
1401
+ * Sets the distance through which the entity can push through.
1402
+ */
1403
+ export class EntityPushThroughComponent extends EntityComponent {
1404
+ protected constructor();
1405
+ /**
1406
+ * @remarks
1407
+ * This property can't be edited in read-only mode.
1408
+ *
1409
+ */
1410
+ value: number;
1411
+ /**
1412
+ * @remarks
1413
+ * Identifier of this component. Should always be
1414
+ * minecraft:push_through.
1415
+ *
1416
+ */
1417
+ static readonly componentId = 'minecraft:push_through';
1418
+ }
1419
+
1420
+ /**
1421
+ * @beta
1422
+ * Sets the entity's visual size.
1423
+ */
1424
+ export class EntityScaleComponent extends EntityComponent {
1425
+ protected constructor();
1426
+ /**
1427
+ * @remarks
1428
+ * This property can't be edited in read-only mode.
1429
+ *
1430
+ */
1431
+ value: number;
1432
+ /**
1433
+ * @remarks
1434
+ * Identifier of this component. Should always be
1435
+ * minecraft:scale.
1436
+ *
1437
+ */
1438
+ static readonly componentId = 'minecraft:scale';
1439
+ }
1440
+
1441
+ /**
1442
+ * @beta
1443
+ * Skin Id value. Can be used to differentiate skins, such as
1444
+ * base skins for villagers.
1445
+ */
1446
+ export class EntitySkinIdComponent extends EntityComponent {
1447
+ protected constructor();
1448
+ /**
1449
+ * @remarks
1450
+ * This property can't be edited in read-only mode.
1451
+ *
1452
+ */
1453
+ value: number;
1454
+ /**
1455
+ * @remarks
1456
+ * Identifier of this component. Should always be
1457
+ * minecraft:skin_id.
1458
+ *
1459
+ */
1460
+ static readonly componentId = 'minecraft:skin_id';
1461
+ }
1462
+
1463
+ /**
1464
+ * @beta
1465
+ * Used to differentiate the component group of a variant of an
1466
+ * entity from others. (e.g. ocelot, villager).
1467
+ */
1468
+ export class EntityVariantComponent extends EntityComponent {
1469
+ protected constructor();
1470
+ readonly value: number;
1471
+ /**
1472
+ * @remarks
1473
+ * Identifier of this component. Should always be
1474
+ * minecraft:variant.
1475
+ *
1476
+ */
1477
+ static readonly componentId = 'minecraft:variant';
1478
+ }
1479
+
1480
+ /**
1481
+ * @beta
1482
+ * When added, this component signifies that this entity wants
1483
+ * to become a jockey.
1484
+ */
1485
+ export class EntityWantsJockeyComponent extends EntityComponent {
1486
+ protected constructor();
1487
+ /**
1488
+ * @remarks
1489
+ * Identifier of this component. Should always be
1490
+ * minecraft:wants_jockey.
1491
+ *
1492
+ */
1493
+ static readonly componentId = 'minecraft:wants_jockey';
806
1494
  }
807
1495
 
808
1496
  /**
809
1497
  * @beta
810
1498
  * Base class for item components.
811
1499
  */
812
- export class ItemComponent {
1500
+ export class ItemComponent extends Component {
813
1501
  protected constructor();
814
1502
  }
815
1503
 
@@ -1266,17 +1954,40 @@ export class World {
1266
1954
 
1267
1955
  /**
1268
1956
  * @beta
1957
+ * Additional options for when damage has been applied via a
1958
+ * projectile.
1269
1959
  */
1270
1960
  export interface EntityApplyDamageByProjectileOptions {
1961
+ /**
1962
+ * @remarks
1963
+ * Optional entity that fired the projectile.
1964
+ *
1965
+ */
1271
1966
  damagingEntity?: Entity;
1967
+ /**
1968
+ * @remarks
1969
+ * Projectile that caused damage.
1970
+ *
1971
+ */
1272
1972
  damagingProjectile: Entity;
1273
1973
  }
1274
1974
 
1275
1975
  /**
1276
1976
  * @beta
1977
+ * Additional descriptions and metadata for a damage event.
1277
1978
  */
1278
1979
  export interface EntityApplyDamageOptions {
1980
+ /**
1981
+ * @remarks
1982
+ * Underlying cause of the damage.
1983
+ *
1984
+ */
1279
1985
  cause: EntityDamageCause;
1986
+ /**
1987
+ * @remarks
1988
+ * Optional entity that caused the damage.
1989
+ *
1990
+ */
1280
1991
  damagingEntity?: Entity;
1281
1992
  }
1282
1993
 
@@ -1506,10 +2217,27 @@ export interface MusicOptions {
1506
2217
 
1507
2218
  /**
1508
2219
  * @beta
2220
+ * Additional options for how a sound plays for a player.
1509
2221
  */
1510
2222
  export interface PlayerSoundOptions {
2223
+ /**
2224
+ * @remarks
2225
+ * Location of the sound; if not specified, the sound is played
2226
+ * near a player.
2227
+ *
2228
+ */
1511
2229
  location?: Vector3;
2230
+ /**
2231
+ * @remarks
2232
+ * Optional pitch of the sound.
2233
+ *
2234
+ */
1512
2235
  pitch?: number;
2236
+ /**
2237
+ * @remarks
2238
+ * Optional volume of the sound.
2239
+ *
2240
+ */
1513
2241
  volume?: number;
1514
2242
  }
1515
2243
 
@@ -1526,9 +2254,21 @@ export interface RawMessage {
1526
2254
 
1527
2255
  /**
1528
2256
  * @beta
2257
+ * Provides a description of a score token to use within a raw
2258
+ * message.
1529
2259
  */
1530
2260
  export interface RawMessageScore {
2261
+ /**
2262
+ * @remarks
2263
+ * Name of the score value to match.
2264
+ *
2265
+ */
1531
2266
  name?: string;
2267
+ /**
2268
+ * @remarks
2269
+ * Name of the score value to match.
2270
+ *
2271
+ */
1532
2272
  objective?: string;
1533
2273
  }
1534
2274
 
@@ -1559,9 +2299,21 @@ export interface Vector3 {
1559
2299
 
1560
2300
  /**
1561
2301
  * @beta
2302
+ * Contains additional options for a world-level playSound
2303
+ * occurrence.
1562
2304
  */
1563
2305
  export interface WorldSoundOptions {
2306
+ /**
2307
+ * @remarks
2308
+ * Pitch of the sound played at the world level.
2309
+ *
2310
+ */
1564
2311
  pitch?: number;
2312
+ /**
2313
+ * @remarks
2314
+ * Relative volume and space by which this sound is heard.
2315
+ *
2316
+ */
1565
2317
  volume?: number;
1566
2318
  }
1567
2319
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "1.2.0-rc.1.20.0-preview.22",
3
+ "version": "1.2.0-rc.1.20.0-preview.23",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {